]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/global.cpp
Drop dead code
[dolphin.git] / src / global.cpp
index 3d6d7dd5e7b7d4ec6c0f3af89aa9bb967820f59f..20dee00fa73ed384d53375abb7c39521793bdce6 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <QApplication>
+#include <QIcon>
+
+#include <KRun>
+
 #include "global.h"
 #include "dolphindebug.h"
 
@@ -41,3 +46,18 @@ QUrl Dolphin::homeUrl()
 {
     return QUrl::fromUserInput(GeneralSettings::homeUrl(), QString(), QUrl::AssumeLocalFile);
 }
+
+void Dolphin::openNewWindow(const QList<QUrl> &urls, QWidget *window, const OpenNewWindowFlags &flags)
+{
+    QString command = QStringLiteral("dolphin");
+
+    if (flags.testFlag(OpenNewWindowFlag::Select)) {
+        command.append(QLatin1String(" --select"));
+    }
+
+    if (!urls.isEmpty()) {
+        command.append(QLatin1String(" %U"));
+    }
+
+    KRun::run(command, urls, window, qApp->applicationDisplayName(), qApp->windowIcon().name());
+}