projectexplorer:use if defined() and elif defined() for improved

compiler compatibility
This commit is contained in:
itsmattkc
2020-02-27 17:47:11 +11:00
parent f9a54ebdb6
commit fde5e47901
@@ -249,9 +249,9 @@ void ProjectExplorer::ShowContextMenu()
if (selected_items.first()->type() == Item::kFootage) { if (selected_items.first()->type() == Item::kFootage) {
QString reveal_text; QString reveal_text;
#ifdef Q_OS_WINDOWS #if defined(Q_OS_WINDOWS)
reveal_text = tr("Reveal in Explorer"); reveal_text = tr("Reveal in Explorer");
#elif Q_OS_MAC #elif defined(Q_OS_MAC)
reveal_text = tr("Reveal in Finder"); reveal_text = tr("Reveal in Finder");
#else #else
reveal_text = tr("Reveal in File Manager"); reveal_text = tr("Reveal in File Manager");
@@ -293,12 +293,12 @@ void ProjectExplorer::RevealSelectedFootage()
{ {
Footage* footage = static_cast<Footage*>(SelectedItems().first()); Footage* footage = static_cast<Footage*>(SelectedItems().first());
#ifdef Q_OS_WINDOWS #if defined(Q_OS_WINDOWS)
// Explorer // Explorer
QStringList args; QStringList args;
args << "/select," << QDir::toNativeSeparators(footage->filename()); args << "/select," << QDir::toNativeSeparators(footage->filename());
QProcess::startDetached("explorer", args); QProcess::startDetached("explorer", args);
#elif Q_OS_MAC #elif defined(Q_OS_MAC)
QStringList args; QStringList args;
args << "-e"; args << "-e";
args << "tell application \"Finder\""; args << "tell application \"Finder\"";