Changeset View
Changeset View
Standalone View
Standalone View
src/dolphinmainwindow.cpp
Show First 20 Lines • Show All 925 Lines • ▼ Show 20 Line(s) | 925 | if (items.count() != 2) { | |||
---|---|---|---|---|---|
926 | // The action is disabled in this case, but it could have been triggered | 926 | // The action is disabled in this case, but it could have been triggered | ||
927 | // via D-Bus, see https://bugs.kde.org/show_bug.cgi?id=325517 | 927 | // via D-Bus, see https://bugs.kde.org/show_bug.cgi?id=325517 | ||
928 | return; | 928 | return; | ||
929 | } | 929 | } | ||
930 | 930 | | |||
931 | QUrl urlA = items.at(0).url(); | 931 | QUrl urlA = items.at(0).url(); | ||
932 | QUrl urlB = items.at(1).url(); | 932 | QUrl urlB = items.at(1).url(); | ||
933 | 933 | | |||
934 | #ifdef Q_OS_MACOS | ||||
935 | QString command(QStringLiteral("open -a kompare --args -c \"")); | ||||
936 | #else | ||||
934 | QString command(QStringLiteral("kompare -c \"")); | 937 | QString command(QStringLiteral("kompare -c \"")); | ||
938 | #endif | ||||
935 | command.append(urlA.toDisplayString(QUrl::PreferLocalFile)); | 939 | command.append(urlA.toDisplayString(QUrl::PreferLocalFile)); | ||
936 | command.append("\" \""); | 940 | command.append("\" \""); | ||
937 | command.append(urlB.toDisplayString(QUrl::PreferLocalFile)); | 941 | command.append(urlB.toDisplayString(QUrl::PreferLocalFile)); | ||
938 | command.append('\"'); | 942 | command.append('\"'); | ||
939 | 943 | | |||
940 | KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(command, this); | 944 | KIO::CommandLauncherJob *job = new KIO::CommandLauncherJob(command, this); | ||
941 | job->setDesktopName(QStringLiteral("org.kde.kompare")); | 945 | job->setDesktopName(QStringLiteral("org.kde.kompare")); | ||
942 | job->start(); | 946 | job->start(); | ||
▲ Show 20 Lines • Show All 1429 Lines • Show Last 20 Lines |