From 2f045c60109e0a5811f68bcce617236e3478e402 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sun, 6 Apr 2014 03:32:55 +0200 Subject: Allow compiling Dolphin with KF5 This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395 --- src/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index a8e785a0d..2eada9aab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,20 +22,22 @@ #include "dolphinmainwindow.h" -#include +#include #include #include #include +#include +#include #include extern "C" KDE_EXPORT int kdemain(int argc, char **argv) { - KAboutData about("dolphin", 0, + K4AboutData about("dolphin", 0, ki18nc("@title", "Dolphin"), KDE_VERSION_STRING, ki18nc("@title", "File Manager"), - KAboutData::License_GPL, + K4AboutData::License_GPL, ki18nc("@info:credit", "(C) 2006-2014 Peter Penz and Frank Reininghaus")); about.setHomepage("http://dolphin.kde.org"); about.addAuthor(ki18nc("@info:credit", "Frank Reininghaus"), -- cgit v1.3 From 470e305be419646a3e1301cd9942be5f1ece58d9 Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Wed, 4 Jun 2014 22:03:08 +0200 Subject: Change the Dolphin version in frameworks to 4.60 Since the KF5 libraries and the applications will not have a synchronized release schedule any more, it does not make sense to continue using KDE_VERSION_STRING as the Dolphin version. --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 2eada9aab..c7c863e32 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -35,7 +35,7 @@ KDE_EXPORT int kdemain(int argc, char **argv) { K4AboutData about("dolphin", 0, ki18nc("@title", "Dolphin"), - KDE_VERSION_STRING, + "4.60", ki18nc("@title", "File Manager"), K4AboutData::License_GPL, ki18nc("@info:credit", "(C) 2006-2014 Peter Penz and Frank Reininghaus")); -- cgit v1.3 From 31a0c4fbd59c93a48f093be62b8ef19e6839de37 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sat, 18 Oct 2014 14:42:41 +0200 Subject: Fix includes --- src/dolphincontextmenu.cpp | 2 +- src/dolphinmainwindow.cpp | 2 +- src/dolphinpart.cpp | 2 +- src/dolphinviewcontainer.cpp | 2 +- src/filterbar/filterbar.cpp | 2 +- src/kitemviews/kfileitemlistview.cpp | 2 +- src/kitemviews/kfileitemmodel.cpp | 2 +- src/kitemviews/kstandarditemlistwidget.cpp | 2 +- src/kitemviews/private/kbaloorolesprovider.cpp | 2 +- src/kitemviews/private/kfileitemmodeldirlister.cpp | 2 +- src/main.cpp | 2 +- src/panels/folders/treeviewcontextmenu.cpp | 2 +- src/panels/information/filemetadataconfigurationdialog.cpp | 4 ++-- src/panels/information/informationpanelcontent.cpp | 2 +- src/panels/information/phononwidget.cpp | 2 +- src/panels/places/placesitem.cpp | 2 +- src/panels/places/placesitemeditdialog.cpp | 2 +- src/panels/places/placesitemmodel.cpp | 2 +- src/panels/places/placespanel.cpp | 2 +- src/search/dolphinfacetswidget.cpp | 2 +- src/search/dolphinsearchbox.cpp | 2 +- src/settings/additionalinfodialog.cpp | 3 ++- src/settings/dolphinsettingsdialog.cpp | 2 +- src/settings/general/behaviorsettingspage.cpp | 2 +- src/settings/general/configurepreviewplugindialog.cpp | 2 +- src/settings/general/confirmationssettingspage.cpp | 2 +- src/settings/general/generalsettingspage.cpp | 2 +- src/settings/general/previewssettingspage.cpp | 2 +- src/settings/general/statusbarsettingspage.cpp | 2 +- src/settings/kcm/kcmdolphingeneral.cpp | 2 +- src/settings/kcm/kcmdolphinnavigation.cpp | 2 +- src/settings/kcm/kcmdolphinservices.cpp | 2 +- src/settings/kcm/kcmdolphinviewmodes.cpp | 2 +- src/settings/navigation/navigationsettingspage.cpp | 2 +- src/settings/services/servicessettingspage.cpp | 2 +- src/settings/startup/startupsettingspage.cpp | 2 +- src/settings/viewmodes/dolphinfontrequester.cpp | 2 +- src/settings/viewmodes/viewsettingspage.cpp | 2 +- src/settings/viewmodes/viewsettingstab.cpp | 2 +- src/settings/viewpropertiesdialog.cpp | 2 +- src/settings/viewpropsprogressinfo.cpp | 2 +- src/statusbar/dolphinstatusbar.cpp | 2 +- src/statusbar/statusbarspaceinfo.cpp | 2 +- src/views/dolphinremoteencoding.cpp | 2 +- src/views/dolphinview.cpp | 2 +- src/views/dolphinviewactionhandler.cpp | 2 +- src/views/draganddrophelper.cpp | 2 +- src/views/renamedialog.cpp | 2 +- src/views/versioncontrol/versioncontrolobserver.cpp | 2 +- src/views/viewproperties.cpp | 2 +- 50 files changed, 52 insertions(+), 51 deletions(-) (limited to 'src/main.cpp') diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 84a09f4d2..f3337a691 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e99788621..e6ef74ef3 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -63,7 +63,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index e3479d3b8..9d4de3fe9 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 0f3aa9761..25207b5b7 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/filterbar/filterbar.cpp b/src/filterbar/filterbar.cpp index b850469bf..4a43dbd23 100644 --- a/src/filterbar/filterbar.cpp +++ b/src/filterbar/filterbar.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include FilterBar::FilterBar(QWidget* parent) : diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp index aee10b5bd..bb918d0de 100644 --- a/src/kitemviews/kfileitemlistview.cpp +++ b/src/kitemviews/kfileitemlistview.cpp @@ -22,7 +22,7 @@ #include "kfileitemmodelrolesupdater.h" #include "kfileitemlistwidget.h" #include "kfileitemmodel.h" -#include +#include #include #include "private/kpixmapmodifier.h" diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 4d5879f4d..25507c23d 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -22,7 +22,7 @@ #include "kfileitemmodel.h" #include -#include +#include #include #include #include //TODO: port to QCollator diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index eaed056e5..b8557c67f 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/kitemviews/private/kbaloorolesprovider.cpp b/src/kitemviews/private/kbaloorolesprovider.cpp index 74f789e23..5ca56c58b 100644 --- a/src/kitemviews/private/kbaloorolesprovider.cpp +++ b/src/kitemviews/private/kbaloorolesprovider.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/src/kitemviews/private/kfileitemmodeldirlister.cpp b/src/kitemviews/private/kfileitemmodeldirlister.cpp index 9dfd17d8e..d5c8bbb18 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.cpp +++ b/src/kitemviews/private/kfileitemmodeldirlister.cpp @@ -18,7 +18,7 @@ ***************************************************************************/ #include "kfileitemmodeldirlister.h" -#include +#include #include KFileItemModelDirLister::KFileItemModelDirLister(QObject* parent) : diff --git a/src/main.cpp b/src/main.cpp index ca047bd16..91d32a08a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index 56e6d44b3..445b261b9 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/panels/information/filemetadataconfigurationdialog.cpp b/src/panels/information/filemetadataconfigurationdialog.cpp index 15f1f4f5f..08723bc0c 100644 --- a/src/panels/information/filemetadataconfigurationdialog.cpp +++ b/src/panels/information/filemetadataconfigurationdialog.cpp @@ -24,8 +24,8 @@ #else #include #endif - -#include +#include +#include #include #include diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 259b672d3..0ec82a424 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/panels/information/phononwidget.cpp b/src/panels/information/phononwidget.cpp index 16dbabfed..27cd3e746 100644 --- a/src/panels/information/phononwidget.cpp +++ b/src/panels/information/phononwidget.cpp @@ -35,7 +35,7 @@ #include #include #include -#include +#include class EmbeddedVideoPlayer : public Phonon::VideoWidget { diff --git a/src/panels/places/placesitem.cpp b/src/panels/places/placesitem.cpp index b82e50256..e667af302 100644 --- a/src/panels/places/placesitem.cpp +++ b/src/panels/places/placesitem.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "placesitemsignalhandler.h" #include #include diff --git a/src/panels/places/placesitemeditdialog.cpp b/src/panels/places/placesitemeditdialog.cpp index 9a239b786..87fbf4c29 100644 --- a/src/panels/places/placesitemeditdialog.cpp +++ b/src/panels/places/placesitemeditdialog.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index aa7f720b4..344e176a3 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 16686f92e..cdc1ebb1a 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index 8e1a9c470..b183eb8a1 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -19,7 +19,7 @@ #include "dolphinfacetswidget.h" -#include +#include #include #include #include diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index b8b1dbbca..94365c7de 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/src/settings/additionalinfodialog.cpp b/src/settings/additionalinfodialog.cpp index 9cce603f5..4d1b69c83 100644 --- a/src/settings/additionalinfodialog.cpp +++ b/src/settings/additionalinfodialog.cpp @@ -21,7 +21,8 @@ #include -#include +#include +#include #include "kitemviews/kfileitemmodel.h" #include #include diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index 533a7f089..43d95a0c6 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -30,7 +30,7 @@ #include "viewmodes/viewsettingspage.h" #include "trash/trashsettingspage.h" -#include +#include #include #include diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index 635a1b2c4..af5308028 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/src/settings/general/configurepreviewplugindialog.cpp b/src/settings/general/configurepreviewplugindialog.cpp index ce70e2bad..9e0f5152b 100644 --- a/src/settings/general/configurepreviewplugindialog.cpp +++ b/src/settings/general/configurepreviewplugindialog.cpp @@ -20,7 +20,7 @@ #include "configurepreviewplugindialog.h" #include -#include +#include #include #include diff --git a/src/settings/general/confirmationssettingspage.cpp b/src/settings/general/confirmationssettingspage.cpp index 532821159..b04ab6192 100644 --- a/src/settings/general/confirmationssettingspage.cpp +++ b/src/settings/general/confirmationssettingspage.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/src/settings/general/generalsettingspage.cpp b/src/settings/general/generalsettingspage.cpp index 3b196e837..07a31bc49 100644 --- a/src/settings/general/generalsettingspage.cpp +++ b/src/settings/general/generalsettingspage.cpp @@ -27,7 +27,7 @@ #include "statusbarsettingspage.h" #include -#include +#include #include #include diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index 7ca5506fa..bd087f1ea 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp index 78ee3856b..cb6ae6cd4 100644 --- a/src/settings/general/statusbarsettingspage.cpp +++ b/src/settings/general/statusbarsettingspage.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/src/settings/kcm/kcmdolphingeneral.cpp b/src/settings/kcm/kcmdolphingeneral.cpp index 821e37a04..82b216c3c 100644 --- a/src/settings/kcm/kcmdolphingeneral.cpp +++ b/src/settings/kcm/kcmdolphingeneral.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/settings/kcm/kcmdolphinnavigation.cpp b/src/settings/kcm/kcmdolphinnavigation.cpp index 6265df586..e7892a246 100644 --- a/src/settings/kcm/kcmdolphinnavigation.cpp +++ b/src/settings/kcm/kcmdolphinnavigation.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/settings/kcm/kcmdolphinservices.cpp b/src/settings/kcm/kcmdolphinservices.cpp index 150ea6d6d..ff0b09318 100644 --- a/src/settings/kcm/kcmdolphinservices.cpp +++ b/src/settings/kcm/kcmdolphinservices.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/settings/kcm/kcmdolphinviewmodes.cpp b/src/settings/kcm/kcmdolphinviewmodes.cpp index 9f2829c1b..83d697712 100644 --- a/src/settings/kcm/kcmdolphinviewmodes.cpp +++ b/src/settings/kcm/kcmdolphinviewmodes.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/settings/navigation/navigationsettingspage.cpp b/src/settings/navigation/navigationsettingspage.cpp index 5894599a1..10e009faa 100644 --- a/src/settings/navigation/navigationsettingspage.cpp +++ b/src/settings/navigation/navigationsettingspage.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/src/settings/services/servicessettingspage.cpp b/src/settings/services/servicessettingspage.cpp index da49c7d0a..f258b53e2 100644 --- a/src/settings/services/servicessettingspage.cpp +++ b/src/settings/services/servicessettingspage.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp index 8e8cf9e73..f1cdfecb8 100644 --- a/src/settings/startup/startupsettingspage.cpp +++ b/src/settings/startup/startupsettingspage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/settings/viewmodes/dolphinfontrequester.cpp b/src/settings/viewmodes/dolphinfontrequester.cpp index 278fb0933..e5427f9f3 100644 --- a/src/settings/viewmodes/dolphinfontrequester.cpp +++ b/src/settings/viewmodes/dolphinfontrequester.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/src/settings/viewmodes/viewsettingspage.cpp b/src/settings/viewmodes/viewsettingspage.cpp index 941b211ef..2639c8bb4 100644 --- a/src/settings/viewmodes/viewsettingspage.cpp +++ b/src/settings/viewmodes/viewsettingspage.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/src/settings/viewmodes/viewsettingstab.cpp b/src/settings/viewmodes/viewsettingstab.cpp index 6f442099f..2169ca955 100644 --- a/src/settings/viewmodes/viewsettingstab.cpp +++ b/src/settings/viewmodes/viewsettingstab.cpp @@ -25,7 +25,7 @@ #include "dolphin_iconsmodesettings.h" #include -#include +#include #include #include diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index 576154f2b..20229a34b 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/settings/viewpropsprogressinfo.cpp b/src/settings/viewpropsprogressinfo.cpp index 13998cf87..a75547609 100644 --- a/src/settings/viewpropsprogressinfo.cpp +++ b/src/settings/viewpropsprogressinfo.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 5feeaa361..4892ee7a8 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/src/statusbar/statusbarspaceinfo.cpp b/src/statusbar/statusbarspaceinfo.cpp index 43d9f342d..dd909beb4 100644 --- a/src/statusbar/statusbarspaceinfo.cpp +++ b/src/statusbar/statusbarspaceinfo.cpp @@ -22,7 +22,7 @@ #include "spaceinfoobserver.h" -#include +#include #include #include diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp index 97a15313a..059b898e5 100644 --- a/src/views/dolphinremoteencoding.cpp +++ b/src/views/dolphinremoteencoding.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index b3df1ebd6..189849376 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 41c3a5dca..c3d4319a2 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/views/draganddrophelper.cpp b/src/views/draganddrophelper.cpp index 5bae50ef7..0dada5e55 100644 --- a/src/views/draganddrophelper.cpp +++ b/src/views/draganddrophelper.cpp @@ -21,7 +21,7 @@ #include "draganddrophelper.h" #include -#include +#include #include #include #include diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index e9fda4a56..82c4c8b9d 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -20,7 +20,7 @@ #include "renamedialog.h" #include -#include +#include #include #include #include diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index c7677de53..dca99ed11 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -21,7 +21,7 @@ #include "dolphin_versioncontrolsettings.h" -#include +#include #include #include #include diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index 95c44bc84..06097977d 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -24,7 +24,7 @@ #include "dolphin_generalsettings.h" #include -#include +#include #include #include #include -- cgit v1.3 From e1789b559eb63ee517e73968eee72ad8837e7a6f Mon Sep 17 00:00:00 2001 From: Andrius da Costa Ribas Date: Sat, 8 Nov 2014 19:50:38 -0200 Subject: Fix Exports. REVIEW: 121078 --- src/kitemviews/kfileitemlistview.h | 2 +- src/kitemviews/kfileitemlistwidget.h | 2 +- src/kitemviews/kfileitemmodel.h | 2 +- src/kitemviews/kfileitemmodelrolesupdater.h | 2 +- src/kitemviews/kitemlistcontainer.h | 2 +- src/kitemviews/kitemlistcontroller.h | 2 +- src/kitemviews/kitemlistgroupheader.h | 2 +- src/kitemviews/kitemlistheader.h | 2 +- src/kitemviews/kitemlistselectionmanager.h | 2 +- src/kitemviews/kitemliststyleoption.h | 2 +- src/kitemviews/kitemlistview.h | 2 +- src/kitemviews/kitemlistviewaccessible.h | 2 +- src/kitemviews/kitemlistwidget.h | 2 +- src/kitemviews/kitemmodelbase.h | 2 +- src/kitemviews/kstandarditem.h | 2 +- src/kitemviews/kstandarditemlistgroupheader.h | 2 +- src/kitemviews/kstandarditemlistview.h | 2 +- src/kitemviews/kstandarditemlistwidget.h | 2 +- src/kitemviews/kstandarditemmodel.h | 2 +- src/kitemviews/private/kbaloorolesprovider.h | 2 +- src/kitemviews/private/kfileitemmodeldirlister.h | 2 +- src/kitemviews/private/kfileitemmodelfilter.h | 2 +- src/kitemviews/private/kitemlistheaderwidget.h | 2 +- .../private/kitemlistkeyboardsearchmanager.h | 2 +- src/kitemviews/private/kitemlistrubberband.h | 2 +- src/kitemviews/private/kitemlistselectiontoggle.h | 2 +- src/kitemviews/private/kitemlistsizehintresolver.h | 2 +- src/kitemviews/private/kitemlistsmoothscroller.h | 2 +- src/kitemviews/private/kitemlistviewanimation.h | 2 +- src/kitemviews/private/kitemlistviewlayouter.h | 2 +- src/kitemviews/private/kpixmapmodifier.h | 2 +- src/libdolphin_export.h | 38 ---------------------- src/main.cpp | 4 +-- src/views/dolphinfileitemlistwidget.h | 2 +- src/views/dolphinitemlistview.h | 2 +- src/views/versioncontrol/updateitemstatesthread.h | 2 +- src/views/versioncontrol/versioncontrolobserver.h | 2 +- src/views/viewmodecontroller.h | 2 +- src/views/viewproperties.h | 2 +- 39 files changed, 38 insertions(+), 78 deletions(-) delete mode 100644 src/libdolphin_export.h (limited to 'src/main.cpp') diff --git a/src/kitemviews/kfileitemlistview.h b/src/kitemviews/kfileitemlistview.h index 9f07c9d8d..72688893e 100644 --- a/src/kitemviews/kfileitemlistview.h +++ b/src/kitemviews/kfileitemlistview.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMLISTVIEW_H #define KFILEITEMLISTVIEW_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h index b7061d38c..32959e4f6 100644 --- a/src/kitemviews/kfileitemlistwidget.h +++ b/src/kitemviews/kfileitemlistwidget.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMLISTWIDGET_H #define KFILEITEMLISTWIDGET_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 535e0f3e4..d98d4538d 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMMODEL_H #define KFILEITEMMODEL_H -#include +#include "libdolphin_export.h" #include #include #include diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index e8b186a96..6c82dbe4a 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -25,7 +25,7 @@ #include #include -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kitemlistcontainer.h b/src/kitemviews/kitemlistcontainer.h index 55a9a118f..6f2851b3e 100644 --- a/src/kitemviews/kitemlistcontainer.h +++ b/src/kitemviews/kitemlistcontainer.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTCONTAINER_H #define KITEMLISTCONTAINER_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h index 99df53104..ed5b71615 100644 --- a/src/kitemviews/kitemlistcontroller.h +++ b/src/kitemviews/kitemlistcontroller.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTCONTROLLER_H #define KITEMLISTCONTROLLER_H -#include +#include "libdolphin_export.h" #include "kitemset.h" diff --git a/src/kitemviews/kitemlistgroupheader.h b/src/kitemviews/kitemlistgroupheader.h index 66fe929dd..c89da5027 100644 --- a/src/kitemviews/kitemlistgroupheader.h +++ b/src/kitemviews/kitemlistgroupheader.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTGROUPHEADER_H #define KITEMLISTGROUPHEADER_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kitemlistheader.h b/src/kitemviews/kitemlistheader.h index fe2d0ac10..b361b912b 100644 --- a/src/kitemviews/kitemlistheader.h +++ b/src/kitemviews/kitemlistheader.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTHEADER_H #define KITEMLISTHEADER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kitemlistselectionmanager.h b/src/kitemviews/kitemlistselectionmanager.h index c4decd39e..a8318388c 100644 --- a/src/kitemviews/kitemlistselectionmanager.h +++ b/src/kitemviews/kitemlistselectionmanager.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTSELECTIONMANAGER_H #define KITEMLISTSELECTIONMANAGER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kitemliststyleoption.h b/src/kitemviews/kitemliststyleoption.h index 782dd0ec2..9290dc341 100644 --- a/src/kitemviews/kitemliststyleoption.h +++ b/src/kitemviews/kitemliststyleoption.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSTYLEOPTION_H #define KITEMLISTSTYLEOPTION_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index cc0754f2a..8130e45ed 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTVIEW_H #define KITEMLISTVIEW_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kitemlistviewaccessible.h b/src/kitemviews/kitemlistviewaccessible.h index 674f1d1af..87cf4b9fa 100644 --- a/src/kitemviews/kitemlistviewaccessible.h +++ b/src/kitemviews/kitemlistviewaccessible.h @@ -22,7 +22,7 @@ #ifndef QT_NO_ACCESSIBILITY -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index 07fc789f0..723847c43 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTWIDGET_H #define KITEMLISTWIDGET_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index 283cfa552..e46d761fc 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -23,7 +23,7 @@ #ifndef KITEMMODELBASE_H #define KITEMMODELBASE_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kstandarditem.h b/src/kitemviews/kstandarditem.h index 59190bfd5..b1d5edf2e 100644 --- a/src/kitemviews/kstandarditem.h +++ b/src/kitemviews/kstandarditem.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEM_H #define KSTANDARDITEM_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/kstandarditemlistgroupheader.h b/src/kitemviews/kstandarditemlistgroupheader.h index 871c93d8d..caf906ddf 100644 --- a/src/kitemviews/kstandarditemlistgroupheader.h +++ b/src/kitemviews/kstandarditemlistgroupheader.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMLISTGROUPHEADER_H #define KSTANDARDITEMLISTGROUPHEADER_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kstandarditemlistview.h b/src/kitemviews/kstandarditemlistview.h index eb07c7f08..9fc43a940 100644 --- a/src/kitemviews/kstandarditemlistview.h +++ b/src/kitemviews/kstandarditemlistview.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMLISTVIEW_H #define KSTANDARDITEMLISTVIEW_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h index 7683f8433..8e61d06b4 100644 --- a/src/kitemviews/kstandarditemlistwidget.h +++ b/src/kitemviews/kstandarditemlistwidget.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMLISTWIDGET_H #define KSTANDARDITEMLISTWIDGET_H -#include +#include "libdolphin_export.h" #include diff --git a/src/kitemviews/kstandarditemmodel.h b/src/kitemviews/kstandarditemmodel.h index 9d1db1a2b..3b5f5bd39 100644 --- a/src/kitemviews/kstandarditemmodel.h +++ b/src/kitemviews/kstandarditemmodel.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMMODEL_H #define KSTANDARDITEMMODEL_H -#include +#include "libdolphin_export.h" #include #include #include diff --git a/src/kitemviews/private/kbaloorolesprovider.h b/src/kitemviews/private/kbaloorolesprovider.h index f1ad5c740..08d564d65 100644 --- a/src/kitemviews/private/kbaloorolesprovider.h +++ b/src/kitemviews/private/kbaloorolesprovider.h @@ -21,7 +21,7 @@ #ifndef KBALOO_ROLESPROVIDER_H #define KBALOO_ROLESPROVIDER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kfileitemmodeldirlister.h b/src/kitemviews/private/kfileitemmodeldirlister.h index 94a0e39fd..a9c8c845a 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.h +++ b/src/kitemviews/private/kfileitemmodeldirlister.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMMODELDIRLISTER_H #define KFILEITEMMODELDIRLISTER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kfileitemmodelfilter.h b/src/kitemviews/private/kfileitemmodelfilter.h index e4fb0a2ee..b26e31a00 100644 --- a/src/kitemviews/private/kfileitemmodelfilter.h +++ b/src/kitemviews/private/kfileitemmodelfilter.h @@ -21,7 +21,7 @@ #ifndef KFILEITEMMODELFILTER_H #define KFILEITEMMODELFILTER_H -#include +#include "libdolphin_export.h" #include class KFileItem; diff --git a/src/kitemviews/private/kitemlistheaderwidget.h b/src/kitemviews/private/kitemlistheaderwidget.h index b99f45f35..74c9ac518 100644 --- a/src/kitemviews/private/kitemlistheaderwidget.h +++ b/src/kitemviews/private/kitemlistheaderwidget.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTHEADERWIDGET_H #define KITEMLISTHEADERWIDGET_H -#include +#include "libdolphin_export.h" #include #include #include diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h index 661178db8..1f315dabd 100644 --- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h +++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTKEYBOARDSEARCHMANAGER_H #define KITEMLISTKEYBOARDSEARCHMANAGER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kitemlistrubberband.h b/src/kitemviews/private/kitemlistrubberband.h index aea58af46..39c7573ae 100644 --- a/src/kitemviews/private/kitemlistrubberband.h +++ b/src/kitemviews/private/kitemlistrubberband.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTRUBBERBAND_H #define KITEMLISTRUBBERBAND_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kitemlistselectiontoggle.h b/src/kitemviews/private/kitemlistselectiontoggle.h index 8a1a857f6..bd64879af 100644 --- a/src/kitemviews/private/kitemlistselectiontoggle.h +++ b/src/kitemviews/private/kitemlistselectiontoggle.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSELECTIONTOGGLE_H #define KITEMLISTSELECTIONTOGGLE_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kitemlistsizehintresolver.h b/src/kitemviews/private/kitemlistsizehintresolver.h index a0ad033f3..3bd2319dd 100644 --- a/src/kitemviews/private/kitemlistsizehintresolver.h +++ b/src/kitemviews/private/kitemlistsizehintresolver.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSIZEHINTRESOLVER_H #define KITEMLISTSIZEHINTRESOLVER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kitemlistsmoothscroller.h b/src/kitemviews/private/kitemlistsmoothscroller.h index ea5682208..963cf7b24 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.h +++ b/src/kitemviews/private/kitemlistsmoothscroller.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSMOOTHSCROLLER_H #define KITEMLISTSMOOTHSCROLLER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kitemlistviewanimation.h b/src/kitemviews/private/kitemlistviewanimation.h index e2e533850..ee4a08bce 100644 --- a/src/kitemviews/private/kitemlistviewanimation.h +++ b/src/kitemviews/private/kitemlistviewanimation.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTVIEWANIMATION_H #define KITEMLISTVIEWANIMATION_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kitemlistviewlayouter.h b/src/kitemviews/private/kitemlistviewlayouter.h index 0efcab12b..fc82d6061 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.h +++ b/src/kitemviews/private/kitemlistviewlayouter.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTVIEWLAYOUTER_H #define KITEMLISTVIEWLAYOUTER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index 4f863c349..b5eec6542 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -20,7 +20,7 @@ #ifndef KPIXMAPMODIFIER_H #define KPIXMAPMODIFIER_H -#include +#include "libdolphin_export.h" class QPixmap; class QSize; diff --git a/src/libdolphin_export.h b/src/libdolphin_export.h deleted file mode 100644 index ff0f125c4..000000000 --- a/src/libdolphin_export.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - This file is part of the KDE project - Copyright (C) 2007 Montel Laurent - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2 as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef LIBDOLPHIN_EXPORT_H -#define LIBDOLPHIN_EXPORT_H - -/* needed for KDE_EXPORT macros */ -#include - -/* needed, because e.g. Q_OS_UNIX is so frequently used */ - -#ifndef LIBDOLPHINPRIVATE_EXPORT -# if defined(MAKE_DOLPHINPRIVATE_LIB) - /* We are building this library */ -# define LIBDOLPHINPRIVATE_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define LIBDOLPHINPRIVATE_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/src/main.cpp b/src/main.cpp index 91d32a08a..bcd19d4d2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,12 +26,10 @@ #include #include #include -#include #include #include -extern "C" -KDE_EXPORT int kdemain(int argc, char **argv) +extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) { K4AboutData about("dolphin", 0, ki18nc("@title", "Dolphin"), diff --git a/src/views/dolphinfileitemlistwidget.h b/src/views/dolphinfileitemlistwidget.h index 5f7c181e9..5f9cc3a5a 100644 --- a/src/views/dolphinfileitemlistwidget.h +++ b/src/views/dolphinfileitemlistwidget.h @@ -20,7 +20,7 @@ #ifndef DOLPHINFILEITEMLISTWIDGET_H #define DOLPHINFILEITEMLISTWIDGET_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/views/dolphinitemlistview.h b/src/views/dolphinitemlistview.h index 7fd72e5c0..2b16825f4 100644 --- a/src/views/dolphinitemlistview.h +++ b/src/views/dolphinitemlistview.h @@ -23,7 +23,7 @@ #include #include -#include +#include "libdolphin_export.h" class KFileItemListView; diff --git a/src/views/versioncontrol/updateitemstatesthread.h b/src/views/versioncontrol/updateitemstatesthread.h index 9b744d5b3..92a9d59c9 100644 --- a/src/views/versioncontrol/updateitemstatesthread.h +++ b/src/views/versioncontrol/updateitemstatesthread.h @@ -20,7 +20,7 @@ #ifndef UPDATEITEMSTATESTHREAD_H #define UPDATEITEMSTATESTHREAD_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/views/versioncontrol/versioncontrolobserver.h b/src/views/versioncontrol/versioncontrolobserver.h index 034ef8bfe..a43dc3415 100644 --- a/src/views/versioncontrol/versioncontrolobserver.h +++ b/src/views/versioncontrol/versioncontrolobserver.h @@ -20,7 +20,7 @@ #ifndef VERSIONCONTROLOBSERVER_H #define VERSIONCONTROLOBSERVER_H -#include +#include "libdolphin_export.h" #include #include diff --git a/src/views/viewmodecontroller.h b/src/views/viewmodecontroller.h index 9ea717ad3..89f1020b5 100644 --- a/src/views/viewmodecontroller.h +++ b/src/views/viewmodecontroller.h @@ -22,7 +22,7 @@ #include #include -#include +#include "libdolphin_export.h" #include /** diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h index d3ea4280f..b9c2fa546 100644 --- a/src/views/viewproperties.h +++ b/src/views/viewproperties.h @@ -23,7 +23,7 @@ #include #include -#include +#include "libdolphin_export.h" class ViewPropertySettings; /** -- cgit v1.3 From c7258487094c7e16258ad90e384c3a87605dfc95 Mon Sep 17 00:00:00 2001 From: Mathieu Tarral Date: Wed, 4 Feb 2015 10:22:03 +0100 Subject: Port Dolphin away from KApplication, KCmdLineArgs and K4AboutData --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 3 +- src/dolphinapplication.cpp | 102 ------------------ src/dolphinapplication.h | 44 -------- src/dolphinmainwindow.cpp | 5 +- src/dolphinmainwindow.h | 12 +-- src/main.cpp | 184 +++++++++++++++++++++------------ src/settings/dolphinsettingsdialog.cpp | 1 - 8 files changed, 128 insertions(+), 225 deletions(-) delete mode 100644 src/dolphinapplication.cpp delete mode 100644 src/dolphinapplication.h (limited to 'src/main.cpp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 43e380754..e2e93b146 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) -find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff) +find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n) find_package(KF5 COMPONENTS Activities) find_package(Phonon4Qt5 CONFIG REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 748b09316..6ae11c833 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,7 +147,6 @@ install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINAT ########################################## set(dolphin_SRCS - dolphinapplication.cpp dolphindockwidget.cpp dolphinmainwindow.cpp dolphinviewcontainer.cpp @@ -236,6 +235,8 @@ target_link_libraries(kdeinit_dolphin KF5::Solid Phonon::phonon4qt5 KF5::KDELibs4Support + KF5::I18n + KF5::CoreAddons ) if (KF5Activities_FOUND) diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp deleted file mode 100644 index da9358e37..000000000 --- a/src/dolphinapplication.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006-2011 by Peter Penz * - * Copyright (C) 2006 by Holger 'zecke' Freyther * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#include "dolphinapplication.h" -#include "dolphinmainwindow.h" -#include "dolphin_generalsettings.h" - -#include -#include -#include - -DolphinApplication::DolphinApplication() : - m_mainWindow(0) -{ - m_mainWindow = new DolphinMainWindow(); - m_mainWindow->setAttribute(Qt::WA_DeleteOnClose); - - KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); - - const int argsCount = args->count(); - - QList urls; - for (int i = 0; i < argsCount; ++i) { - const QUrl url = args->url(i); - if (url.isValid()) { - urls.append(url); - } - } - - bool resetSplitSettings = false; - if (args->isSet("split") && !GeneralSettings::splitView()) { - // Dolphin should be opened with a split view although this is not - // set in the GeneralSettings. Temporary adjust the setting until - // all passed URLs have been opened. - GeneralSettings::setSplitView(true); - resetSplitSettings = true; - - // We need 2 URLs to open Dolphin in split view mode - if (urls.isEmpty()) { // No URL given - Open home URL in all two views - urls.append(GeneralSettings::homeUrl()); - urls.append(GeneralSettings::homeUrl()); - } else if (urls.length() == 1) { // Only 1 URL given - Open given URL in all two views - urls.append(urls.at(0)); - } - } - - if (!urls.isEmpty()) { - if (args->isSet("select")) { - m_mainWindow->openFiles(urls); - } else { - m_mainWindow->openDirectories(urls); - } - } else { - const QUrl homeUrl(QUrl::fromLocalFile(GeneralSettings::homeUrl())); - m_mainWindow->openNewActivatedTab(homeUrl); - } - - if (resetSplitSettings) { - GeneralSettings::setSplitView(false); - } - - args->clear(); - - m_mainWindow->show(); -} - -DolphinApplication::~DolphinApplication() -{ -} - -DolphinApplication* DolphinApplication::app() -{ - return qobject_cast(qApp); -} - -void DolphinApplication::restoreSession() -{ - const QString className = KXmlGuiWindow::classNameOfToplevel(1); - if (className == QLatin1String("DolphinMainWindow")) { - m_mainWindow->restore(1); - } else { - kWarning() << "Unknown class " << className << " in session saved data!"; - } -} - diff --git a/src/dolphinapplication.h b/src/dolphinapplication.h deleted file mode 100644 index 69d07c36e..000000000 --- a/src/dolphinapplication.h +++ /dev/null @@ -1,44 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006-2011 by Peter Penz * - * Copyright (C) 2006 by Holger 'zecke' Freyther * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - ***************************************************************************/ - -#ifndef DOLPHIN_APPLICATION_H -#define DOLPHIN_APPLICATION_H - -#include - -class DolphinMainWindow; - -class DolphinApplication : public KApplication -{ - Q_OBJECT - -public: - DolphinApplication(); - virtual ~DolphinApplication(); - - static DolphinApplication* app(); - - void restoreSession(); - -private: - DolphinMainWindow* m_mainWindow; -}; - -#endif diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 218698bef..0ee6e5c2c 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -21,7 +21,6 @@ #include "dolphinmainwindow.h" -#include "dolphinapplication.h" #include "dolphindockwidget.h" #include "dolphincontextmenu.h" #include "dolphinnewfilemenu.h" @@ -69,6 +68,7 @@ #include #include +#include #include #include #include @@ -353,8 +353,7 @@ 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; - DolphinApplication *application = qobject_cast(qApp); - if (application && application->sessionSaving()) { + if (qApp->isSessionRestored()) { closedByUser = false; } diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 8c8d42ee4..e3188aee5 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -36,7 +36,6 @@ typedef KIO::FileUndoManager::CommandType CommandType; class DolphinViewActionHandler; -class DolphinApplication; class DolphinSettingsDialog; class DolphinViewContainer; class DolphinRemoteEncoding; @@ -58,7 +57,6 @@ class DolphinMainWindow: public KXmlGuiWindow Q_OBJECT Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.MainWindow") Q_PROPERTY(int id READ getId SCRIPTABLE true) - friend class DolphinApplication; public: DolphinMainWindow(); @@ -121,6 +119,11 @@ public slots: /** Stores all settings and quits Dolphin. */ void quit(); + /** + * Opens a new tab showing the URL \a url and activates the tab. + */ + void openNewActivatedTab(const QUrl& url); + signals: /** * Is sent if the selection of the currently active view has @@ -335,11 +338,6 @@ private slots: */ void openNewTab(const QUrl& url); - /** - * Opens a new tab showing the URL \a url and activates the tab. - */ - void openNewActivatedTab(const QUrl& url); - /** * Opens the selected folder in a new tab. */ diff --git a/src/main.cpp b/src/main.cpp index bcd19d4d2..ed4cfff20 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ /*************************************************************************** * Copyright (C) 2006 by Peter Penz * * Copyright (C) 2006 by Stefan Monov * + * Copyright (C) 2015 by Mathieu Tarral * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -18,80 +19,131 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ -#include "dolphinapplication.h" - #include "dolphinmainwindow.h" +#include "dolphin_generalsettings.h" -#include -#include +#include +#include +#include +#include #include -#include -#include #include extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) { - K4AboutData about("dolphin", 0, - ki18nc("@title", "Dolphin"), - "4.60", - ki18nc("@title", "File Manager"), - K4AboutData::License_GPL, - ki18nc("@info:credit", "(C) 2006-2014 Peter Penz, Frank Reininghaus, and Emmanuel Pescosta")); - about.setHomepage("http://dolphin.kde.org"); - about.addAuthor(ki18nc("@info:credit", "Emmanuel Pescosta"), - ki18nc("@info:credit", "Maintainer (since 2014) and developer"), - "emmanuelpescosta099@gmail.com"); - about.addAuthor(ki18nc("@info:credit", "Frank Reininghaus"), - ki18nc("@info:credit", "Maintainer (2012-2014) and developer"), - "frank78ac@googlemail.com"); - about.addAuthor(ki18nc("@info:credit", "Peter Penz"), - ki18nc("@info:credit", "Maintainer and developer (2006-2012)"), - "peter.penz19@gmail.com"); - about.addAuthor(ki18nc("@info:credit", "Sebastian Trüg"), - ki18nc("@info:credit", "Developer"), - "trueg@kde.org"), - about.addAuthor(ki18nc("@info:credit", "David Faure"), - ki18nc("@info:credit", "Developer"), - "faure@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Aaron J. Seigo"), - ki18nc("@info:credit", "Developer"), - "aseigo@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Rafael Fernández López"), - ki18nc("@info:credit", "Developer"), - "ereslibre@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Kevin Ottens"), - ki18nc("@info:credit", "Developer"), - "ervin@kde.org"); - about.addAuthor(ki18nc("@info:credit", "Holger Freyther"), - ki18nc("@info:credit", "Developer"), - "freyther@gmx.net"); - about.addAuthor(ki18nc("@info:credit", "Max Blazejak"), - ki18nc("@info:credit", "Developer"), - "m43ksrocks@gmail.com"); - about.addAuthor(ki18nc("@info:credit", "Michael Austin"), - ki18nc("@info:credit", "Documentation"), - "tuxedup@users.sourceforge.net"); - // the .desktop file is not taken into account when launching manually, so - // set the icon precautionally: - about.setProgramIconName("system-file-manager"); - - KCmdLineArgs::init(argc, argv, &about); - - KCmdLineOptions options; - - options.add("select", ki18nc("@info:shell", "The files and directories passed as arguments " - "will be selected.")); - options.add("split", ki18nc("@info:shell", "Dolphin will get started with a split view.")); - options.add("+[Url]", ki18nc("@info:shell", "Document to open")); - KCmdLineArgs::addCmdLineOptions(options); - - { - DolphinApplication app; - if (app.isSessionRestored()) { - app.restoreSession(); + QApplication app(argc, argv); + app.setWindowIcon(QIcon::fromTheme("system-file-manager")); + + KAboutData aboutData("dolphin", i18n("Dolphin"), "4.60", + i18nc("@title", "File Manager"), + KAboutLicense::GPL, + i18nc("@info:credit", "(C) 2006-2014 Peter Penz, Frank Reininghaus, and Emmanuel Pescosta")); + aboutData.setHomepage("http://dolphin.kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Emmanuel Pescosta"), + i18nc("@info:credit", "Maintainer (since 2014) and developer"), + "emmanuelpescosta099@gmail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Frank Reininghaus"), + i18nc("@info:credit", "Maintainer (2012-2014) and developer"), + "frank78ac@googlemail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Peter Penz"), + i18nc("@info:credit", "Maintainer and developer (2006-2012)"), + "peter.penz19@gmail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Sebastian Trüg"), + i18nc("@info:credit", "Developer"), + "trueg@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "David Faure"), + i18nc("@info:credit", "Developer"), + "faure@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Aaron J. Seigo"), + i18nc("@info:credit", "Developer"), + "aseigo@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Rafael Fernández López"), + i18nc("@info:credit", "Developer"), + "ereslibre@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Kevin Ottens"), + i18nc("@info:credit", "Developer"), + "ervin@kde.org"); + aboutData.addAuthor(i18nc("@info:credit", "Holger Freyther"), + i18nc("@info:credit", "Developer"), + "freyther@gmx.net"); + aboutData.addAuthor(i18nc("@info:credit", "Max Blazejak"), + i18nc("@info:credit", "Developer"), + "m43ksrocks@gmail.com"); + aboutData.addAuthor(i18nc("@info:credit", "Michael Austin"), + i18nc("@info:credit", "Documentation"), + "tuxedup@users.sourceforge.net"); + + KAboutData::setApplicationData(aboutData); + + QCommandLineParser parser; + parser.addVersionOption(); + parser.addHelpOption(); + aboutData.setupCommandLine(&parser); + + // command line options + parser.addOption(QCommandLineOption(QStringList() << QLatin1String("select"), i18nc("@info:shell", "The files and directories passed as arguments " + "will be selected."))); + parser.addOption(QCommandLineOption(QStringList() << QLatin1String("split"), i18nc("@info:shell", "Dolphin will get started with a split view."))); + parser.addPositionalArgument(QLatin1String("+[Url]"), i18nc("@info:shell", "Document to open")); + + parser.process(app); + aboutData.processCommandLine(&parser); + + + DolphinMainWindow* m_mainWindow = new DolphinMainWindow(); + m_mainWindow->setAttribute(Qt::WA_DeleteOnClose); + + QList urls; + const QStringList args = parser.positionalArguments(); + foreach (const QString& str, args) { + const QUrl url(str); + if (url.isValid()) { + urls.append(url); + } + } + + bool resetSplitSettings = false; + if (parser.isSet("split") && !GeneralSettings::splitView()) { + // Dolphin should be opened with a split view although this is not + // set in the GeneralSettings. Temporary adjust the setting until + // all passed URLs have been opened. + GeneralSettings::setSplitView(true); + resetSplitSettings = true; + + // We need 2 URLs to open Dolphin in split view mode + if (urls.isEmpty()) { // No URL given - Open home URL in all two views + urls.append(GeneralSettings::homeUrl()); + urls.append(GeneralSettings::homeUrl()); + } else if (urls.length() == 1) { // Only 1 URL given - Open given URL in all two views + urls.append(urls.at(0)); + } + } + + if (!urls.isEmpty()) { + if (parser.isSet("select")) { + m_mainWindow->openFiles(urls); + } else { + m_mainWindow->openDirectories(urls); + } + } else { + const QUrl homeUrl(QUrl::fromLocalFile(GeneralSettings::homeUrl())); + m_mainWindow->openNewActivatedTab(homeUrl); + } + + if (resetSplitSettings) { + GeneralSettings::setSplitView(false); + } + + m_mainWindow->show(); + + if (app.isSessionRestored()) { + const QString className = KXmlGuiWindow::classNameOfToplevel(1); + if (className == QLatin1String("DolphinMainWindow")) { + m_mainWindow->restore(1); + } else { + kWarning() << "Unknown class " << className << " in session saved data!"; } - app.exec(); // krazy:exclude=crashy } - return 0; + return app.exec(); // krazy:exclude=crash; } diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index 3b72ed45c..820fc0e68 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -20,7 +20,6 @@ #include "dolphinsettingsdialog.h" -#include #include #include "dolphin_generalsettings.h" #include "general/generalsettingspage.h" -- cgit v1.3 From 1b3ea64abb0579e71ce1dfa490a0805b399be930 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 4 Feb 2015 10:29:33 +0100 Subject: Add dolphin dbus service --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 1 + src/main.cpp | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/CMakeLists.txt b/CMakeLists.txt index e2e93b146..9899ed0de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) -find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n) +find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n DBusAddons) find_package(KF5 COMPONENTS Activities) find_package(Phonon4Qt5 CONFIG REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6ae11c833..0c31ed936 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -237,6 +237,7 @@ target_link_libraries(kdeinit_dolphin KF5::KDELibs4Support KF5::I18n KF5::CoreAddons + KF5::DBusAddons ) if (KF5Activities_FOUND) diff --git a/src/main.cpp b/src/main.cpp index ed4cfff20..ed4c9f9d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,6 +22,7 @@ #include "dolphinmainwindow.h" #include "dolphin_generalsettings.h" +#include #include #include #include @@ -75,6 +76,8 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) KAboutData::setApplicationData(aboutData); + KDBusService dolphinDBusService; + QCommandLineParser parser; parser.addVersionOption(); parser.addHelpOption(); -- cgit v1.3 From 85cc0e78c7fff95cd54c00e7e5e4e3aa07399fa5 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Fri, 6 Feb 2015 09:32:39 +0100 Subject: Migrate settings --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index ed4c9f9d8..094402f90 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,10 +29,16 @@ #include #include #include +#include extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) { QApplication app(argc, argv); + Kdelibs4ConfigMigrator migrate(QStringLiteral("dolphin")); + migrate.setConfigFiles(QStringList() << QStringLiteral("dolphinrc")); + migrate.setUiFiles(QStringList() << QStringLiteral("dolphinpart.rc") << QStringLiteral("dolphinui.rc")); + migrate.migrate(); + app.setWindowIcon(QIcon::fromTheme("system-file-manager")); KAboutData aboutData("dolphin", i18n("Dolphin"), "4.60", -- cgit v1.3 From b86d0def3924391e90fc582f719447e2ecdfa014 Mon Sep 17 00:00:00 2001 From: Arjun AK Date: Mon, 9 Feb 2015 18:01:56 +0530 Subject: Construct URLs passed via cmdline args using QUrl::fromUserInput() Otherwise user will have to type "dolphin file:///tmp" instead of "dolphin /tmp" REVIEW: 122475 BUG: 343906 --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 094402f90..321938323 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -105,9 +105,11 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) QList urls; const QStringList args = parser.positionalArguments(); foreach (const QString& str, args) { - const QUrl url(str); + const QUrl url = QUrl::fromUserInput(str); if (url.isValid()) { urls.append(url); + } else { + qWarning() << "Invalid URL: " << str; } } -- cgit v1.3 From 2305e34cc335327497b0c7715b458f9eb86405fa Mon Sep 17 00:00:00 2001 From: Arjun AK Date: Tue, 10 Feb 2015 11:21:53 +0530 Subject: Assume links passed via cmdline args are local files If not, when the user types 'dolphin nonexistantfile' he will be taken to 'http://nonexistantfile' BUG: 343906 --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 321938323..14529005f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -105,7 +105,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) QList urls; const QStringList args = parser.positionalArguments(); foreach (const QString& str, args) { - const QUrl url = QUrl::fromUserInput(str); + const QUrl url = QUrl::fromUserInput(str, QString(), QUrl::AssumeLocalFile); if (url.isValid()) { urls.append(url); } else { -- cgit v1.3 From 169cca55b9621689712321da8c0425f8002d0008 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Tue, 24 Feb 2015 13:07:35 +0100 Subject: Replace kDebug/kWarning by categorized logging (org.kde.dolphin) --- src/CMakeLists.txt | 1 + src/dolphindebug.cpp | 22 +++++++++++ src/dolphindebug.h | 27 +++++++++++++ src/dolphinpart.cpp | 8 ++-- src/kitemviews/kfileitemmodel.cpp | 44 +++++++++++----------- src/kitemviews/kitemlistview.cpp | 8 ++-- src/kitemviews/private/kitemlistviewlayouter.cpp | 4 +- src/main.cpp | 6 +-- src/panels/folders/folderspanel.cpp | 2 +- src/panels/places/placesitem.cpp | 2 +- src/panels/places/placesitemeditdialog.cpp | 2 +- src/panels/places/placesitemmodel.cpp | 30 +++++++-------- src/panels/places/placespanel.cpp | 2 +- src/settings/serviceitemdelegate.cpp | 2 +- src/tests/kstandarditemmodeltest.cpp | 4 +- src/views/dolphinfileitemlistwidget.cpp | 2 +- src/views/dolphinremoteencoding.cpp | 8 ++-- src/views/dolphinviewactionhandler.cpp | 2 +- .../versioncontrol/versioncontrolobserver.cpp | 4 +- src/views/viewproperties.cpp | 6 +-- 20 files changed, 118 insertions(+), 68 deletions(-) create mode 100644 src/dolphindebug.cpp create mode 100644 src/dolphindebug.h (limited to 'src/main.cpp') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 17ac9cd21..4637e09d0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -72,6 +72,7 @@ set(dolphinprivate_LIB_SRCS views/zoomlevelinfo.cpp dolphinremoveaction.cpp dolphinnewfilemenu.cpp + dolphindebug.cpp ) if(HAVE_BALOO) diff --git a/src/dolphindebug.cpp b/src/dolphindebug.cpp new file mode 100644 index 000000000..17f108427 --- /dev/null +++ b/src/dolphindebug.cpp @@ -0,0 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2015 by Emmanuel Pescosta * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#include "dolphindebug.h" + +Q_LOGGING_CATEGORY(DolphinDebug, "org.kde.dolphin") diff --git a/src/dolphindebug.h b/src/dolphindebug.h new file mode 100644 index 000000000..9b4554b49 --- /dev/null +++ b/src/dolphindebug.h @@ -0,0 +1,27 @@ +/*************************************************************************** + * Copyright (C) 2015 by Emmanuel Pescosta * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + ***************************************************************************/ + +#ifndef DOLPHIN_DEBUG_H +#define DOLPHIN_DEBUG_H + +#include + +Q_DECLARE_LOGGING_CATEGORY(DolphinDebug) + +#endif // DOLPHIN_DEBUG_H diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index cd1ac52b8..3473218e5 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include "dolphindebug.h" #include #include #include @@ -138,7 +138,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL connect(lister, &KDirLister::newItems, notifyExt, &DolphinPartListingNotificationExtension::slotNewItems); connect(lister, &KDirLister::itemsDeleted, notifyExt, &DolphinPartListingNotificationExtension::slotItemsDeleted); } else { - kWarning() << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported"; + qCWarning(DolphinDebug) << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported"; } createActions(); @@ -340,7 +340,7 @@ void DolphinPart::slotMessage(const QString& msg) void DolphinPart::slotErrorMessage(const QString& msg) { - kDebug() << msg; + qCDebug(DolphinDebug) << msg; emit canceled(msg); //KMessageBox::error(m_view, msg); } @@ -471,7 +471,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos, void DolphinPart::slotDirectoryRedirection(const QUrl &oldUrl, const QUrl &newUrl) { - //kDebug() << oldUrl << newUrl << "currentUrl=" << url(); + //qCDebug(DolphinDebug) << oldUrl << newUrl << "currentUrl=" << url(); if (oldUrl.matches(url(), QUrl::StripTrailingSlash /* #207572 */)) { KParts::ReadOnlyPart::setUrl(newUrl); const QString prettyUrl = newUrl.toDisplayString(QUrl::PreferLocalFile); diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 222a940a9..eac3ddf8b 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -24,7 +24,7 @@ #include "dolphin_generalsettings.h" #include -#include +#include "dolphindebug.h" #include "private/kfileitemmodelsortalgorithm.h" #include "private/kfileitemmodeldirlister.h" @@ -339,7 +339,7 @@ QList > KFileItemModel::groups() const } #ifdef KFILEITEMMODEL_DEBUG - kDebug() << "[TIME] Calculating groups for" << count() << "items:" << timer.elapsed(); + qCDebug(DolphinDebug) << "[TIME] Calculating groups for" << count() << "items:" << timer.elapsed(); #endif } @@ -408,9 +408,9 @@ int KFileItemModel::index(const QUrl& url) const if (m_items.count() != m_itemData.count() && printDebugInfo) { printDebugInfo = false; - kWarning() << "The model is in an inconsistent state."; - kWarning() << "m_items.count() ==" << m_items.count(); - kWarning() << "m_itemData.count() ==" << m_itemData.count(); + qCWarning(DolphinDebug) << "The model is in an inconsistent state."; + qCWarning(DolphinDebug) << "m_items.count() ==" << m_items.count(); + qCWarning(DolphinDebug) << "m_itemData.count() ==" << m_itemData.count(); // Check if there are multiple items with the same URL. QMultiHash indexesForUrl; @@ -420,12 +420,12 @@ int KFileItemModel::index(const QUrl& url) const foreach (const QUrl& url, indexesForUrl.uniqueKeys()) { if (indexesForUrl.count(url) > 1) { - kWarning() << "Multiple items found with the URL" << url; + qCWarning(DolphinDebug) << "Multiple items found with the URL" << url; foreach (int index, indexesForUrl.values(url)) { const ItemData* data = m_itemData.at(index); - kWarning() << "index" << index << ":" << data->item; + qCWarning(DolphinDebug) << "index" << index << ":" << data->item; if (data->parent) { - kWarning() << "parent" << data->parent->item; + qCWarning(DolphinDebug) << "parent" << data->parent->item; } } } @@ -795,8 +795,8 @@ void KFileItemModel::resortAllItems() #ifdef KFILEITEMMODEL_DEBUG QElapsedTimer timer; timer.start(); - kDebug() << "==========================================================="; - kDebug() << "Resorting" << itemCount << "items"; + qCDebug(DolphinDebug) << "==========================================================="; + qCDebug(DolphinDebug) << "Resorting" << itemCount << "items"; #endif // Remember the order of the current URLs so @@ -858,7 +858,7 @@ void KFileItemModel::resortAllItems() } #ifdef KFILEITEMMODEL_DEBUG - kDebug() << "[TIME] Resorting of" << itemCount << "items:" << timer.elapsed(); + qCDebug(DolphinDebug) << "[TIME] Resorting of" << itemCount << "items:" << timer.elapsed(); #endif } @@ -1013,7 +1013,7 @@ void KFileItemModel::slotRefreshItems(const QList >& { Q_ASSERT(!items.isEmpty()); #ifdef KFILEITEMMODEL_DEBUG - kDebug() << "Refreshing" << items.count() << "items"; + qCDebug(DolphinDebug) << "Refreshing" << items.count() << "items"; #endif // Get the indexes of all items that have been refreshed @@ -1079,7 +1079,7 @@ void KFileItemModel::slotRefreshItems(const QList >& void KFileItemModel::slotClear() { #ifdef KFILEITEMMODEL_DEBUG - kDebug() << "Clearing all items"; + qCDebug(DolphinDebug) << "Clearing all items"; #endif qDeleteAll(m_filteredItems.values()); @@ -1126,8 +1126,8 @@ void KFileItemModel::insertItems(QList& newItems) #ifdef KFILEITEMMODEL_DEBUG QElapsedTimer timer; timer.start(); - kDebug() << "==========================================================="; - kDebug() << "Inserting" << newItems.count() << "items"; + qCDebug(DolphinDebug) << "==========================================================="; + qCDebug(DolphinDebug) << "Inserting" << newItems.count() << "items"; #endif m_groups.clear(); @@ -1144,7 +1144,7 @@ void KFileItemModel::insertItems(QList& newItems) sort(newItems.begin(), newItems.end()); #ifdef KFILEITEMMODEL_DEBUG - kDebug() << "[TIME] Sorting:" << timer.elapsed(); + qCDebug(DolphinDebug) << "[TIME] Sorting:" << timer.elapsed(); #endif KItemRangeList itemRanges; @@ -1208,7 +1208,7 @@ void KFileItemModel::insertItems(QList& newItems) emit itemsInserted(itemRanges); #ifdef KFILEITEMMODEL_DEBUG - kDebug() << "[TIME] Inserting of" << newItems.count() << "items:" << timer.elapsed(); + qCDebug(DolphinDebug) << "[TIME] Inserting of" << newItems.count() << "items:" << timer.elapsed(); #endif } @@ -2213,19 +2213,19 @@ bool KFileItemModel::isConsistent() const // Check if m_items and m_itemData are consistent. const KFileItem item = fileItem(i); if (item.isNull()) { - qWarning() << "Item" << i << "is null"; + qCWarning(DolphinDebug) << "Item" << i << "is null"; return false; } const int itemIndex = index(item); if (itemIndex != i) { - qWarning() << "Item" << i << "has a wrong index:" << itemIndex; + qCWarning(DolphinDebug) << "Item" << i << "has a wrong index:" << itemIndex; return false; } // Check if the items are sorted correctly. if (i > 0 && !lessThan(m_itemData.at(i - 1), m_itemData.at(i), m_collator)) { - qWarning() << "The order of items" << i - 1 << "and" << i << "is wrong:" + qCWarning(DolphinDebug) << "The order of items" << i - 1 << "and" << i << "is wrong:" << fileItem(i - 1) << fileItem(i); return false; } @@ -2235,13 +2235,13 @@ bool KFileItemModel::isConsistent() const const ItemData* parent = data->parent; if (parent) { if (expandedParentsCount(data) != expandedParentsCount(parent) + 1) { - qWarning() << "expandedParentsCount is inconsistent for parent" << parent->item << "and child" << data->item; + qCWarning(DolphinDebug) << "expandedParentsCount is inconsistent for parent" << parent->item << "and child" << data->item; return false; } const int parentIndex = index(parent->item); if (parentIndex >= i) { - qWarning() << "Index" << parentIndex << "of parent" << parent->item << "is not smaller than index" << i << "of child" << data->item; + qCWarning(DolphinDebug) << "Index" << parentIndex << "of parent" << parent->item << "is not smaller than index" << i << "of child" << data->item; return false; } } diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 0d0304afc..9416f0dd7 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -22,7 +22,7 @@ #include "kitemlistview.h" -#include +#include "dolphindebug.h" #include "kitemlistcontainer.h" #include "kitemlistcontroller.h" #include "kitemlistheader.h" @@ -543,7 +543,7 @@ void KItemListView::endTransaction() --m_activeTransactions; if (m_activeTransactions < 0) { m_activeTransactions = 0; - qWarning() << "Mismatch between beginTransaction()/endTransaction()"; + qCWarning(DolphinDebug) << "Mismatch between beginTransaction()/endTransaction()"; } if (m_activeTransactions == 0) { @@ -1006,7 +1006,7 @@ void KItemListView::slotItemsInserted(const KItemRangeList& itemRanges) const int index = range.index + previouslyInsertedCount; const int count = range.count; if (index < 0 || count <= 0) { - qWarning() << "Invalid item range (index:" << index << ", count:" << count << ")"; + qCWarning(DolphinDebug) << "Invalid item range (index:" << index << ", count:" << count << ")"; continue; } previouslyInsertedCount += count; @@ -1114,7 +1114,7 @@ void KItemListView::slotItemsRemoved(const KItemRangeList& itemRanges) const int index = range.index; const int count = range.count; if (index < 0 || count <= 0) { - qWarning() << "Invalid item range (index:" << index << ", count:" << count << ")"; + qCWarning(DolphinDebug) << "Invalid item range (index:" << index << ", count:" << count << ")"; continue; } diff --git a/src/kitemviews/private/kitemlistviewlayouter.cpp b/src/kitemviews/private/kitemlistviewlayouter.cpp index e2dcc62e7..d54457908 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.cpp +++ b/src/kitemviews/private/kitemlistviewlayouter.cpp @@ -22,7 +22,7 @@ #include #include "kitemlistsizehintresolver.h" -#include +#include "dolphindebug.h" // #define KITEMLISTVIEWLAYOUTER_DEBUG @@ -516,7 +516,7 @@ void KItemListViewLayouter::doLayout() } #ifdef KITEMLISTVIEWLAYOUTER_DEBUG - kDebug() << "[TIME] doLayout() for " << m_model->count() << "items:" << timer.elapsed(); + qCDebug(DolphinDebug) << "[TIME] doLayout() for " << m_model->count() << "items:" << timer.elapsed(); #endif m_dirty = false; } diff --git a/src/main.cpp b/src/main.cpp index 14529005f..4291d2fa3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include "dolphindebug.h" #include extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) @@ -109,7 +109,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) if (url.isValid()) { urls.append(url); } else { - qWarning() << "Invalid URL: " << str; + qCWarning(DolphinDebug) << "Invalid URL: " << str; } } @@ -152,7 +152,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) if (className == QLatin1String("DolphinMainWindow")) { m_mainWindow->restore(1); } else { - kWarning() << "Unknown class " << className << " in session saved data!"; + qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; } } diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 9169ee9e3..e99c673bc 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -49,7 +49,7 @@ #include -#include +#include "dolphindebug.h" FoldersPanel::FoldersPanel(QWidget* parent) : Panel(parent), diff --git a/src/panels/places/placesitem.cpp b/src/panels/places/placesitem.cpp index 59c2ed733..638d59ec0 100644 --- a/src/panels/places/placesitem.cpp +++ b/src/panels/places/placesitem.cpp @@ -23,7 +23,7 @@ #include "placesitem.h" #include -#include +#include "dolphindebug.h" #include #include #include "placesitemsignalhandler.h" diff --git a/src/panels/places/placesitemeditdialog.cpp b/src/panels/places/placesitemeditdialog.cpp index cd04ea3f1..d5ca4bf4f 100644 --- a/src/panels/places/placesitemeditdialog.cpp +++ b/src/panels/places/placesitemeditdialog.cpp @@ -24,7 +24,7 @@ #include "placesitemeditdialog.h" #include -#include +#include "dolphindebug.h" #include #include #include diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 95a913e82..28244c645 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include "dolphindebug.h" #include #include #include @@ -191,7 +191,7 @@ void PlacesItemModel::setHiddenItemsShown(bool show) } #ifdef PLACESITEMMODEL_DEBUG - kDebug() << "Changed visibility of hidden items"; + qCDebug(DolphinDebug) << "Changed visibility of hidden items"; showModelState(); #endif } @@ -496,7 +496,7 @@ void PlacesItemModel::onItemInserted(int index) } #ifdef PLACESITEMMODEL_DEBUG - kDebug() << "Inserted item" << index; + qCDebug(DolphinDebug) << "Inserted item" << index; showModelState(); #endif } @@ -514,7 +514,7 @@ void PlacesItemModel::onItemRemoved(int index, KStandardItem* removedItem) m_bookmarkedItems.removeAt(boomarkIndex); #ifdef PLACESITEMMODEL_DEBUG - kDebug() << "Removed item" << index; + qCDebug(DolphinDebug) << "Removed item" << index; showModelState(); #endif } @@ -807,7 +807,7 @@ void PlacesItemModel::loadBookmarks() } #ifdef PLACESITEMMODEL_DEBUG - kDebug() << "Loaded bookmarks"; + qCDebug(DolphinDebug) << "Loaded bookmarks"; showModelState(); #endif } @@ -1176,25 +1176,25 @@ QUrl PlacesItemModel::searchUrlForType(const QString& type) #ifdef PLACESITEMMODEL_DEBUG void PlacesItemModel::showModelState() { - kDebug() << "================================="; - kDebug() << "Model:"; - kDebug() << "hidden-index model-index text"; + qCDebug(DolphinDebug) << "================================="; + qCDebug(DolphinDebug) << "Model:"; + qCDebug(DolphinDebug) << "hidden-index model-index text"; int modelIndex = 0; for (int i = 0; i < m_bookmarkedItems.count(); ++i) { if (m_bookmarkedItems[i]) { - kDebug() << i << "(Hidden) " << " " << m_bookmarkedItems[i]->dataValue("text").toString(); + qCDebug(DolphinDebug) << i << "(Hidden) " << " " << m_bookmarkedItems[i]->dataValue("text").toString(); } else { if (item(modelIndex)) { - kDebug() << i << " " << modelIndex << " " << item(modelIndex)->dataValue("text").toString(); + qCDebug(DolphinDebug) << i << " " << modelIndex << " " << item(modelIndex)->dataValue("text").toString(); } else { - kDebug() << i << " " << modelIndex << " " << "(not available yet)"; + qCDebug(DolphinDebug) << i << " " << modelIndex << " " << "(not available yet)"; } ++modelIndex; } } - kDebug(); - kDebug() << "Bookmarks:"; + qCDebug(DolphinDebug); + qCDebug(DolphinDebug) << "Bookmarks:"; int bookmarkIndex = 0; KBookmarkGroup root = m_bookmarkManager->root(); @@ -1203,9 +1203,9 @@ void PlacesItemModel::showModelState() const QString udi = bookmark.metaDataItem("UDI"); const QString text = udi.isEmpty() ? bookmark.text() : udi; if (bookmark.metaDataItem("IsHidden") == QLatin1String("true")) { - kDebug() << bookmarkIndex << "(Hidden)" << text; + qCDebug(DolphinDebug) << bookmarkIndex << "(Hidden)" << text; } else { - kDebug() << bookmarkIndex << " " << text; + qCDebug(DolphinDebug) << bookmarkIndex << " " << text; } bookmark = root.next(bookmark); diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index 5618cee21..50ed7e73a 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -26,7 +26,7 @@ #include "dolphin_generalsettings.h" #include -#include +#include "dolphindebug.h" #include #include #include diff --git a/src/settings/serviceitemdelegate.cpp b/src/settings/serviceitemdelegate.cpp index 774ea78ae..a72dd9ec8 100644 --- a/src/settings/serviceitemdelegate.cpp +++ b/src/settings/serviceitemdelegate.cpp @@ -19,7 +19,7 @@ #include "serviceitemdelegate.h" -#include +#include "dolphindebug.h" #include #include diff --git a/src/tests/kstandarditemmodeltest.cpp b/src/tests/kstandarditemmodeltest.cpp index e83e2031d..ea65cc4ce 100644 --- a/src/tests/kstandarditemmodeltest.cpp +++ b/src/tests/kstandarditemmodeltest.cpp @@ -98,13 +98,13 @@ bool KStandardItemModelTest::isModelConsistent() const for (int i = 0; i < m_model->count(); ++i) { const KStandardItem* item = m_model->item(i); if (!item) { - qWarning() << "Item" << i << "is null"; + qCWarning(DolphinDebug) << "Item" << i << "is null"; return false; } const int itemIndex = m_model->index(item); if (itemIndex != i) { - qWarning() << "Item" << i << "has a wrong index:" << itemIndex; + qCWarning(DolphinDebug) << "Item" << i << "has a wrong index:" << itemIndex; return false; } } diff --git a/src/views/dolphinfileitemlistwidget.cpp b/src/views/dolphinfileitemlistwidget.cpp index de927d91f..e8345435e 100644 --- a/src/views/dolphinfileitemlistwidget.cpp +++ b/src/views/dolphinfileitemlistwidget.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include "dolphindebug.h" DolphinFileItemListWidget::DolphinFileItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent) : diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp index fbf21c08f..961a7c800 100644 --- a/src/views/dolphinremoteencoding.cpp +++ b/src/views/dolphinremoteencoding.cpp @@ -26,7 +26,7 @@ #include "dolphinremoteencoding.h" #include "dolphinviewactionhandler.h" -#include +#include "dolphindebug.h" #include #include #include @@ -141,10 +141,10 @@ void DolphinRemoteEncoding::updateMenu() } } - kDebug() << "URL=" << m_currentURL << " charset=" << charset; + qCDebug(DolphinDebug) << "URL=" << m_currentURL << " charset=" << charset; if (!isFound) { - kWarning() << "could not find entry for charset=" << charset ; + qCWarning(DolphinDebug) << "could not find entry for charset=" << charset ; } else { m_menu->menu()->actions().at(id)->setChecked(true); } @@ -211,7 +211,7 @@ void DolphinRemoteEncoding::slotDefault() } for (QStringList::const_iterator it = domains.constBegin(); it != domains.constEnd();++it) { - kDebug() << "Domain to remove: " << *it; + qCDebug(DolphinDebug) << "Domain to remove: " << *it; if (config.hasGroup(*it)) { config.deleteGroup(*it); } else if (config.group("").hasKey(*it)) { diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 4eec88ff8..ac538a648 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include "dolphindebug.h" #ifdef HAVE_BALOO #include diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 79ba8dcc4..47e3da357 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include "dolphindebug.h" #include #include #include @@ -94,7 +94,7 @@ QList VersionControlObserver::actions(const KFileItemList& items) cons bool hasNullItems = false; foreach (const KFileItem& item, items) { if (item.isNull()) { - kWarning() << "Requesting version-control-actions for empty items"; + qCWarning(DolphinDebug) << "Requesting version-control-actions for empty items"; hasNullItems = true; break; } diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index c8d92be6d..05c993585 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -24,7 +24,7 @@ #include "dolphin_generalsettings.h" #include -#include +#include "dolphindebug.h" #include #include @@ -359,7 +359,7 @@ void ViewProperties::update() void ViewProperties::save() { - kDebug() << "Saving view-properties to" << m_filePath; + qCDebug(DolphinDebug) << "Saving view-properties to" << m_filePath; QDir dir; dir.mkpath(m_filePath); m_node->setVersion(CurrentViewPropertiesVersion); @@ -388,7 +388,7 @@ QString ViewProperties::viewModePrefix() const case DolphinView::IconsView: prefix = "Icons_"; break; case DolphinView::CompactView: prefix = "Compact_"; break; case DolphinView::DetailsView: prefix = "Details_"; break; - default: kWarning() << "Unknown view-mode of the view properties"; + default: qCWarning(DolphinDebug) << "Unknown view-mode of the view properties"; } return prefix; -- cgit v1.3 From f8d8256cbb6834a27da4bee2401e2f5768e81a4a Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Tue, 24 Feb 2015 14:14:36 +0100 Subject: Fix the build temporarily The port of Dolphin to categorized logging created errors in one specific point only, in main.cpp: undefined reference to `DolphinDebug()' I couldn't spot any obvious error, so for now I did it the bad way (warnings should not be commented out!) to keep it building while a real solution is found. CCMAIL: emmanuelpescosta099@gmail.com --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 4291d2fa3..3c9dd6130 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -109,7 +109,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) if (url.isValid()) { urls.append(url); } else { - qCWarning(DolphinDebug) << "Invalid URL: " << str; + // qCWarning(DolphinDebug) << "Invalid URL: " << str; } } @@ -152,7 +152,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) if (className == QLatin1String("DolphinMainWindow")) { m_mainWindow->restore(1); } else { - qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; + // qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; } } -- cgit v1.3 From f6b4f562167969365d4aae14d73060c6fdb8270f Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Tue, 24 Feb 2015 17:07:55 +0100 Subject: Fix build on Jenkins (or with BUILD_TESTING=ON) --- src/CMakeLists.txt | 2 ++ src/dolphinpart.cpp | 6 +++--- src/main.cpp | 4 ++-- src/tests/CMakeLists.txt | 6 ++++++ src/tests/kstandarditemmodeltest.cpp | 2 ++ 5 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/main.cpp') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4637e09d0..ea21f1af2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -129,6 +129,7 @@ install(TARGETS dolphinprivate ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) set(dolphinpart_SRCS dolphinpart.cpp dolphinpart_ext.cpp + dolphindebug.cpp ) add_library(dolphinpart MODULE ${dolphinpart_SRCS}) @@ -202,6 +203,7 @@ set(dolphin_SRCS statusbar/spaceinfoobserver.cpp statusbar/statusbarspaceinfo.cpp views/zoomlevelinfo.cpp + dolphindebug.cpp ) kconfig_add_kcfg_files(dolphin_SRCS GENERATE_MOC diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 2679ac3df..35f328be5 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -138,7 +138,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL connect(lister, &KDirLister::newItems, notifyExt, &DolphinPartListingNotificationExtension::slotNewItems); connect(lister, &KDirLister::itemsDeleted, notifyExt, &DolphinPartListingNotificationExtension::slotItemsDeleted); } else { - // qCWarning(DolphinDebug) << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported"; + qCWarning(DolphinDebug) << "NULL KDirLister object! KParts::ListingNotificationExtension will NOT be supported"; } createActions(); @@ -340,7 +340,7 @@ void DolphinPart::slotMessage(const QString& msg) void DolphinPart::slotErrorMessage(const QString& msg) { - // qCDebug(DolphinDebug) << msg; + qCDebug(DolphinDebug) << msg; emit canceled(msg); //KMessageBox::error(m_view, msg); } @@ -471,7 +471,7 @@ void DolphinPart::slotOpenContextMenu(const QPoint& pos, void DolphinPart::slotDirectoryRedirection(const QUrl &oldUrl, const QUrl &newUrl) { - // qCDebug(DolphinDebug) << oldUrl << newUrl << "currentUrl=" << url(); + qCDebug(DolphinDebug) << oldUrl << newUrl << "currentUrl=" << url(); if (oldUrl.matches(url(), QUrl::StripTrailingSlash /* #207572 */)) { KParts::ReadOnlyPart::setUrl(newUrl); const QString prettyUrl = newUrl.toDisplayString(QUrl::PreferLocalFile); diff --git a/src/main.cpp b/src/main.cpp index 3c9dd6130..b8eb9a556 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -109,7 +109,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) if (url.isValid()) { urls.append(url); } else { - // qCWarning(DolphinDebug) << "Invalid URL: " << str; + qCWarning(DolphinDebug) << "Invalid URL: " << str; } } @@ -152,7 +152,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) if (className == QLatin1String("DolphinMainWindow")) { m_mainWindow->restore(1); } else { - // qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; + qCWarning(DolphinDebug) << "Unknown class " << className << " in session saved data!"; } } diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index fe9665d11..1c6c5b40c 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -56,6 +56,7 @@ set(kitemlistcontrollertest_SRCS ../kitemviews/kitemset.cpp ../kitemviews/kstandarditemlistview.cpp ../kitemviews/kstandarditemlistwidget.cpp + ../dolphindebug.cpp ) kconfig_add_kcfg_files(kitemlistcontrollertest_SRCS GENERATE_MOC @@ -81,6 +82,7 @@ set(kfileitemlistviewtest_SRCS ../kitemviews/kitemset.cpp ../kitemviews/kstandarditemlistview.cpp ../kitemviews/kstandarditemlistwidget.cpp + ../dolphindebug.cpp ) kconfig_add_kcfg_files(kfileitemlistviewtest_SRCS GENERATE_MOC @@ -99,6 +101,7 @@ set(kfileitemmodeltest_SRCS ../kitemviews/kfileitemmodel.cpp ../kitemviews/kitemmodelbase.cpp ../kitemviews/kitemset.cpp + ../dolphindebug.cpp ) kconfig_add_kcfg_files(kfileitemmodeltest_SRCS GENERATE_MOC @@ -116,6 +119,7 @@ set(kfileitemmodelbenchmark_SRCS testdir.cpp ../kitemviews/kfileitemmodel.cpp ../kitemviews/kitemmodelbase.cpp + ../dolphindebug.cpp ) kconfig_add_kcfg_files(kfileitemmodelbenchmark_SRCS GENERATE_MOC @@ -160,6 +164,7 @@ set(kstandarditemmodeltest_SRCS ../kitemviews/kstandarditem.cpp ../kitemviews/kstandarditemmodel.cpp ../kitemviews/kitemmodelbase.cpp + ../dolphindebug.cpp ) add_executable(kstandarditemmodeltest ${kstandarditemmodeltest_SRCS}) @@ -172,6 +177,7 @@ set(viewpropertiestest_SRCS viewpropertiestest.cpp testdir.cpp ../views/viewproperties.cpp + ../dolphindebug.cpp ) kconfig_add_kcfg_files(viewpropertiestest_SRCS GENERATE_MOC ../settings/dolphin_generalsettings.kcfgc diff --git a/src/tests/kstandarditemmodeltest.cpp b/src/tests/kstandarditemmodeltest.cpp index ea65cc4ce..93aaf3686 100644 --- a/src/tests/kstandarditemmodeltest.cpp +++ b/src/tests/kstandarditemmodeltest.cpp @@ -18,6 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ +#include "dolphindebug.h" + #include "kitemviews/kstandarditem.h" #include "kitemviews/kstandarditemmodel.h" -- cgit v1.3 From 8a7d9b6d2c308563397d13f5e9430334201620bb Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 25 Feb 2015 21:45:19 +0100 Subject: Bump the Qt version to 5.4 and the KF5 version to 5.7 Added all required components Reviewed-By: David Edmundson --- CMakeLists.txt | 38 +++++++++++++++++++++++++++++++++----- src/CMakeLists.txt | 2 +- src/main.cpp | 2 +- 3 files changed, 35 insertions(+), 7 deletions(-) (limited to 'src/main.cpp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a007f302..f31def98e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,12 +2,16 @@ cmake_minimum_required(VERSION 2.8.12) project(Dolphin) +set(DOLPHIN_VERSION "14.12.95") + +set(QT_MIN_VERSION "5.4.0") +set(KF5_MIN_VERSION "5.7.0") +set(ECM_MIN_VERSION "1.6.0") + # ECM setup -find_package(ECM 1.6.0 CONFIG REQUIRED) +find_package(ECM ${ECM_MIN_VERSION} CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) -set(DOLPHIN_VERSION "4.97.0") - include(ECMSetupVersion) include(ECMGenerateHeaders) include(ECMPackageConfigHelpers) @@ -27,8 +31,32 @@ ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) -find_package(KF5 REQUIRED COMPONENTS DocTools Init KCMUtils KDELibs4Support NewStuff CoreAddons I18n DBusAddons) -find_package(KF5 COMPONENTS Activities) +find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS + Core + Widgets + Gui + DBus + Test +) + +find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS + DocTools + Init + KCMUtils + KDELibs4Support + NewStuff + CoreAddons + I18n + DBusAddons + Bookmarks + Config + KIO + Parts + Solid +) +find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS + Activities +) find_package(Phonon4Qt5 CONFIG REQUIRED) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2b65671da..94aa5a51c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,7 +3,7 @@ configure_file(config-baloo.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-baloo.h) configure_file(config-dolphin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-dolphin.h) -add_definitions(-DTRANSLATION_DOMAIN=\"dolphin\") +add_definitions(-DTRANSLATION_DOMAIN=\"dolphin\" -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING) if(X11_Xrender_FOUND) diff --git a/src/main.cpp b/src/main.cpp index b8eb9a556..e8d6c2d29 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -41,7 +41,7 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv) app.setWindowIcon(QIcon::fromTheme("system-file-manager")); - KAboutData aboutData("dolphin", i18n("Dolphin"), "4.60", + KAboutData aboutData("dolphin", i18n("Dolphin"), "14.12.95", i18nc("@title", "File Manager"), KAboutLicense::GPL, i18nc("@info:credit", "(C) 2006-2014 Peter Penz, Frank Reininghaus, and Emmanuel Pescosta")); -- cgit v1.3