From 4bca9cbc8bb6b2e47c2f99fe85e075022813b4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 28 Aug 2015 23:29:20 +0200 Subject: [PATCH] dolphin: fix build for qtbase without session management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- recipes-kde/apps/dolphin/dolphin.bb | 5 +- .../files/0001-align-paths-to-phonon.patch | 2 +- ...or-qtbase-without-session-management.patch | 53 +++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 recipes-kde/apps/dolphin/files/0002-fix-build-for-qtbase-without-session-management.patch diff --git a/recipes-kde/apps/dolphin/dolphin.bb b/recipes-kde/apps/dolphin/dolphin.bb index 599c9df3..7b22b62e 100644 --- a/recipes-kde/apps/dolphin/dolphin.bb +++ b/recipes-kde/apps/dolphin/dolphin.bb @@ -35,7 +35,10 @@ DEPENDS += " \ PV = "${KDE_APP_VERSION}" SRC_URI[md5sum] = "11760d094c2c3e3fff0e89b81d4db118" SRC_URI[sha256sum] = "7ac16d7150b7c5e1d6350cf679981d675c995303a7f68eab1290763d3fd35ad9" -SRC_URI += "file://0001-align-paths-to-phonon.patch" +SRC_URI += " \ + file://0001-align-paths-to-phonon.patch \ + file://0002-fix-build-for-qtbase-without-session-management.patch \ +" FILES_SOLIBSDEV = "${libdir}/libdolphin*${SOLIBSDEV}" diff --git a/recipes-kde/apps/dolphin/files/0001-align-paths-to-phonon.patch b/recipes-kde/apps/dolphin/files/0001-align-paths-to-phonon.patch index b26c840c..3ea57a53 100644 --- a/recipes-kde/apps/dolphin/files/0001-align-paths-to-phonon.patch +++ b/recipes-kde/apps/dolphin/files/0001-align-paths-to-phonon.patch @@ -1,7 +1,7 @@ From ed293f192c85976efdff4d8253a63a9d1a801d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 23 Aug 2015 22:59:27 +0200 -Subject: [PATCH] align paths to phonon +Subject: [PATCH 1/2] align paths to phonon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/recipes-kde/apps/dolphin/files/0002-fix-build-for-qtbase-without-session-management.patch b/recipes-kde/apps/dolphin/files/0002-fix-build-for-qtbase-without-session-management.patch new file mode 100644 index 00000000..d6ca2636 --- /dev/null +++ b/recipes-kde/apps/dolphin/files/0002-fix-build-for-qtbase-without-session-management.patch @@ -0,0 +1,53 @@ +From b9abe385e2563d7178fbf982ec6977b9f3e625bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Fri, 28 Aug 2015 23:22:18 +0200 +Subject: [PATCH 2/2] fix build for qtbase without session management +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Müller +--- + src/dolphinmainwindow.cpp | 2 ++ + src/main.cpp | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp +index f7a7613..127cd85 100644 +--- a/src/dolphinmainwindow.cpp ++++ b/src/dolphinmainwindow.cpp +@@ -346,9 +346,11 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) + // Find out if Dolphin is closed directly by the user or + // by the session manager because the session is closed + bool closedByUser = true; ++#ifndef QT_NO_SESSIONMANAGER + if (qApp->isSessionRestored()) { + closedByUser = false; + } ++#endif + + if (m_tabWidget->count() > 1 && GeneralSettings::confirmClosingMultipleTabs() && closedByUser) { + // Ask the user if he really wants to quit and close all tabs. +diff --git a/src/main.cpp b/src/main.cpp +index b4ca2c6..5c058a9 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -134,6 +134,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) + + mainWindow->show(); + ++#ifndef QT_NO_SESSIONMANAGER + if (app.isSessionRestored()) { + const QString className = KXmlGuiWindow::classNameOfToplevel(1); + if (className == QLatin1String("DolphinMainWindow")) { +@@ -142,6 +143,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) + qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; + } + } ++#endif + + return app.exec(); // krazy:exclude=crash; + } +-- +2.1.0 +