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/views/versioncontrol/updateitemstatesthread.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/views/versioncontrol/updateitemstatesthread.cpp') diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index 6457f607d..8472d7dd7 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -20,6 +20,7 @@ #include "updateitemstatesthread.h" #include +#include #include -- cgit v1.3 From a7692611315065b308cd8243563cc50d40bd0f71 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Sun, 29 Jun 2014 10:36:32 +0200 Subject: Remove the automoc noise --- src/dolphinapplication.cpp | 1 - src/dolphincontextmenu.cpp | 1 - src/dolphindockwidget.cpp | 1 - src/dolphinmainwindow.cpp | 1 - src/dolphinnewfilemenu.cpp | 1 - src/dolphinpart_ext.cpp | 1 - src/dolphinviewcontainer.cpp | 1 - src/filterbar/filterbar.cpp | 1 - src/kitemviews/kfileitemlistview.cpp | 1 - src/kitemviews/kfileitemlistwidget.cpp | 1 - src/kitemviews/kfileitemmodel.cpp | 1 - src/kitemviews/kfileitemmodelrolesupdater.cpp | 1 - src/kitemviews/kitemlistcontainer.cpp | 1 - src/kitemviews/kitemlistcontroller.cpp | 1 - src/kitemviews/kitemlistgroupheader.cpp | 1 - src/kitemviews/kitemlistheader.cpp | 1 - src/kitemviews/kitemlistselectionmanager.cpp | 2 +- src/kitemviews/kitemlistview.cpp | 1 - src/kitemviews/kitemlistwidget.cpp | 1 - src/kitemviews/kitemmodelbase.cpp | 1 - src/kitemviews/kstandarditemlistgroupheader.cpp | 1 - src/kitemviews/kstandarditemlistview.cpp | 1 - src/kitemviews/kstandarditemlistwidget.cpp | 1 - src/kitemviews/kstandarditemmodel.cpp | 2 -- src/kitemviews/private/kfileitemclipboard.cpp | 1 - src/kitemviews/private/kfileitemmodeldirlister.cpp | 1 - src/kitemviews/private/kitemlistheaderwidget.cpp | 1 - src/kitemviews/private/kitemlistroleeditor.cpp | 1 - src/kitemviews/private/kitemlistrubberband.cpp | 1 - src/kitemviews/private/kitemlistselectiontoggle.cpp | 1 - src/kitemviews/private/kitemlistsmoothscroller.cpp | 1 - src/kitemviews/private/kitemlistviewanimation.cpp | 1 - src/kitemviews/private/kitemlistviewlayouter.cpp | 1 - src/panels/folders/foldersitemlistwidget.cpp | 1 - src/panels/folders/folderspanel.cpp | 1 - src/panels/folders/treeviewcontextmenu.cpp | 1 - src/panels/information/filemetadataconfigurationdialog.cpp | 1 - src/panels/information/informationpanel.cpp | 1 - src/panels/information/informationpanelcontent.cpp | 1 - src/panels/information/pixmapviewer.cpp | 1 - src/panels/panel.cpp | 1 - src/panels/places/placesitemeditdialog.cpp | 1 - src/panels/places/placesitemlistgroupheader.cpp | 1 - src/panels/places/placesitemlistwidget.cpp | 1 - src/panels/places/placesitemmodel.cpp | 1 - src/panels/places/placesitemsignalhandler.cpp | 1 - src/panels/places/placespanel.cpp | 1 - src/panels/places/placesview.cpp | 1 - src/panels/terminal/terminalpanel.cpp | 1 - src/search/dolphinfacetswidget.cpp | 1 - src/search/dolphinsearchbox.cpp | 1 - src/settings/additionalinfodialog.cpp | 1 - src/settings/applyviewpropsjob.cpp | 1 - src/settings/dolphinsettingsdialog.cpp | 1 - src/settings/general/behaviorsettingspage.cpp | 1 - src/settings/general/configurepreviewplugindialog.cpp | 1 - src/settings/general/confirmationssettingspage.cpp | 1 - src/settings/general/generalsettingspage.cpp | 1 - src/settings/general/previewssettingspage.cpp | 1 - src/settings/general/statusbarsettingspage.cpp | 1 - src/settings/navigation/navigationsettingspage.cpp | 1 - src/settings/serviceitemdelegate.cpp | 1 - src/settings/servicemodel.cpp | 1 - src/settings/services/servicessettingspage.cpp | 1 - src/settings/settingspagebase.cpp | 1 - src/settings/startup/startupsettingspage.cpp | 1 - src/settings/trash/trashsettingspage.cpp | 1 - src/settings/viewmodes/dolphinfontrequester.cpp | 1 - src/settings/viewmodes/viewsettingspage.cpp | 1 - src/settings/viewmodes/viewsettingstab.cpp | 2 +- src/settings/viewpropertiesdialog.cpp | 1 - src/settings/viewpropsprogressinfo.cpp | 1 - src/statusbar/dolphinstatusbar.cpp | 1 - src/statusbar/statusbarspaceinfo.cpp | 1 - src/views/dolphinfileitemlistwidget.cpp | 1 - src/views/dolphinitemlistview.cpp | 1 - src/views/dolphinnewfilemenuobserver.cpp | 1 - src/views/dolphinremoteencoding.cpp | 1 - src/views/dolphinview.cpp | 1 - src/views/renamedialog.cpp | 1 - src/views/tooltips/filemetadatatooltip.cpp | 1 - src/views/tooltips/tooltipmanager.cpp | 1 - src/views/versioncontrol/updateitemstatesthread.cpp | 1 - src/views/versioncontrol/versioncontrolobserver.cpp | 1 - src/views/viewmodecontroller.cpp | 1 - 85 files changed, 2 insertions(+), 86 deletions(-) (limited to 'src/views/versioncontrol/updateitemstatesthread.cpp') diff --git a/src/dolphinapplication.cpp b/src/dolphinapplication.cpp index 8144da8a0..200824e0c 100644 --- a/src/dolphinapplication.cpp +++ b/src/dolphinapplication.cpp @@ -100,4 +100,3 @@ void DolphinApplication::restoreSession() } } -#include "dolphinapplication.moc" diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index 952ffcc99..cf9270fa8 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -530,4 +530,3 @@ void DolphinContextMenu::addCustomActions() } } -#include "dolphincontextmenu.moc" diff --git a/src/dolphindockwidget.cpp b/src/dolphindockwidget.cpp index 6495c8da9..1e83ef841 100644 --- a/src/dolphindockwidget.cpp +++ b/src/dolphindockwidget.cpp @@ -91,4 +91,3 @@ bool DolphinDockWidget::isLocked() const return m_locked; } -#include "dolphindockwidget.moc" diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 7c9001b68..52cc83a09 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -2155,4 +2155,3 @@ void DolphinMainWindow::UndoUiInterface::jobError(KIO::Job* job) } } -#include "dolphinmainwindow.moc" diff --git a/src/dolphinnewfilemenu.cpp b/src/dolphinnewfilemenu.cpp index da57ca946..87f0932d8 100644 --- a/src/dolphinnewfilemenu.cpp +++ b/src/dolphinnewfilemenu.cpp @@ -45,4 +45,3 @@ void DolphinNewFileMenu::slotResult(KJob* job) } } -#include "dolphinnewfilemenu.moc" diff --git a/src/dolphinpart_ext.cpp b/src/dolphinpart_ext.cpp index fb7a4d2ea..8e2985878 100644 --- a/src/dolphinpart_ext.cpp +++ b/src/dolphinpart_ext.cpp @@ -190,4 +190,3 @@ void DolphinPartListingNotificationExtension::slotItemsDeleted(const KFileItemLi emit listingEvent(KParts::ListingNotificationExtension::ItemsDeleted, items); } -#include "dolphinpart_ext.moc" diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp index 761062585..c1677dc43 100644 --- a/src/dolphinviewcontainer.cpp +++ b/src/dolphinviewcontainer.cpp @@ -725,4 +725,3 @@ void DolphinViewContainer::saveViewState() m_urlNavigator->saveLocationState(locationState); } -#include "dolphinviewcontainer.moc" diff --git a/src/filterbar/filterbar.cpp b/src/filterbar/filterbar.cpp index 8ef26435c..827721360 100644 --- a/src/filterbar/filterbar.cpp +++ b/src/filterbar/filterbar.cpp @@ -140,4 +140,3 @@ void FilterBar::keyReleaseEvent(QKeyEvent* event) } } -#include "filterbar.moc" diff --git a/src/kitemviews/kfileitemlistview.cpp b/src/kitemviews/kfileitemlistview.cpp index 933518a69..0a92e75e5 100644 --- a/src/kitemviews/kfileitemlistview.cpp +++ b/src/kitemviews/kfileitemlistview.cpp @@ -423,4 +423,3 @@ QSize KFileItemListView::availableIconSize() const return QSize(iconSize, iconSize); } -#include "kfileitemlistview.moc" diff --git a/src/kitemviews/kfileitemlistwidget.cpp b/src/kitemviews/kfileitemlistwidget.cpp index fe8c7e997..1ea537d1d 100644 --- a/src/kitemviews/kfileitemlistwidget.cpp +++ b/src/kitemviews/kfileitemlistwidget.cpp @@ -161,4 +161,3 @@ int KFileItemListWidget::selectionLength(const QString& text) const return selectionLength; } -#include "kfileitemlistwidget.moc" diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index 33b29c9fc..13057cbbd 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -2246,4 +2246,3 @@ bool KFileItemModel::isConsistent() const return true; } -#include "kfileitemmodel.moc" diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index fb39fd225..5c212a984 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -1170,4 +1170,3 @@ QList KFileItemModelRolesUpdater::indexesToResolve() const return result; } -#include "kfileitemmodelrolesupdater.moc" diff --git a/src/kitemviews/kitemlistcontainer.cpp b/src/kitemviews/kitemlistcontainer.cpp index 39e62962e..765b366d1 100644 --- a/src/kitemviews/kitemlistcontainer.cpp +++ b/src/kitemviews/kitemlistcontainer.cpp @@ -413,4 +413,3 @@ void KItemListContainer::updateScrollOffsetScrollBarPolicy() } } -#include "kitemlistcontainer.moc" diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp index e90f301a9..854a0087a 100644 --- a/src/kitemviews/kitemlistcontroller.cpp +++ b/src/kitemviews/kitemlistcontroller.cpp @@ -1310,4 +1310,3 @@ void KItemListController::updateExtendedSelectionRegion() } } -#include "kitemlistcontroller.moc" diff --git a/src/kitemviews/kitemlistgroupheader.cpp b/src/kitemviews/kitemlistgroupheader.cpp index 17c95a97c..accaf9ecf 100644 --- a/src/kitemviews/kitemlistgroupheader.cpp +++ b/src/kitemviews/kitemlistgroupheader.cpp @@ -233,4 +233,3 @@ QColor KItemListGroupHeader::baseColor() const return styleOption().palette.color(group, normalBaseColorRole()); } -#include "kitemlistgroupheader.moc" diff --git a/src/kitemviews/kitemlistheader.cpp b/src/kitemviews/kitemlistheader.cpp index dd865f3a4..a3fa14d35 100644 --- a/src/kitemviews/kitemlistheader.cpp +++ b/src/kitemviews/kitemlistheader.cpp @@ -85,4 +85,3 @@ KItemListHeader::KItemListHeader(KItemListView* listView) : this, &KItemListHeader::columnWidthChanged); } -#include "kitemlistheader.moc" diff --git a/src/kitemviews/kitemlistselectionmanager.cpp b/src/kitemviews/kitemlistselectionmanager.cpp index 1f0a89d06..ba524a6bf 100644 --- a/src/kitemviews/kitemlistselectionmanager.cpp +++ b/src/kitemviews/kitemlistselectionmanager.cpp @@ -396,4 +396,4 @@ int KItemListSelectionManager::indexAfterRangesRemoving(int index, const KItemRa } return qBound(-1, index - dec, m_model->count() - 1); } -#include "kitemlistselectionmanager.moc" + diff --git a/src/kitemviews/kitemlistview.cpp b/src/kitemviews/kitemlistview.cpp index 39aed1620..fed9b7729 100644 --- a/src/kitemviews/kitemlistview.cpp +++ b/src/kitemviews/kitemlistview.cpp @@ -2717,4 +2717,3 @@ void KItemListGroupHeaderCreatorBase::recycle(KItemListGroupHeader* header) pushRecycleableWidget(header); } -#include "kitemlistview.moc" diff --git a/src/kitemviews/kitemlistwidget.cpp b/src/kitemviews/kitemlistwidget.cpp index a703c2b23..19807a404 100644 --- a/src/kitemviews/kitemlistwidget.cpp +++ b/src/kitemviews/kitemlistwidget.cpp @@ -526,4 +526,3 @@ void KItemListWidget::drawItemStyleOption(QPainter* painter, QWidget* widget, QS widget->style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &viewItemOption, painter, widget); } -#include "kitemlistwidget.moc" diff --git a/src/kitemviews/kitemmodelbase.cpp b/src/kitemviews/kitemmodelbase.cpp index 4312640e4..bf41b1c84 100644 --- a/src/kitemviews/kitemmodelbase.cpp +++ b/src/kitemviews/kitemmodelbase.cpp @@ -159,4 +159,3 @@ void KItemModelBase::onSortOrderChanged(Qt::SortOrder current, Qt::SortOrder pre Q_UNUSED(previous); } -#include "kitemmodelbase.moc" diff --git a/src/kitemviews/kstandarditemlistgroupheader.cpp b/src/kitemviews/kstandarditemlistgroupheader.cpp index 1e23c0a56..99457c9b8 100644 --- a/src/kitemviews/kstandarditemlistgroupheader.cpp +++ b/src/kitemviews/kstandarditemlistgroupheader.cpp @@ -122,4 +122,3 @@ void KStandardItemListGroupHeader::updateCache() } } -#include "kstandarditemlistgroupheader.moc" diff --git a/src/kitemviews/kstandarditemlistview.cpp b/src/kitemviews/kstandarditemlistview.cpp index 135cd0b7d..1c07d5327 100644 --- a/src/kitemviews/kstandarditemlistview.cpp +++ b/src/kitemviews/kstandarditemlistview.cpp @@ -179,4 +179,3 @@ void KStandardItemListView::updateLayoutOfVisibleItems() } } -#include "kstandarditemlistview.moc" diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index a13cb33f4..f7cf52484 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -1464,4 +1464,3 @@ qreal KStandardItemListWidget::columnPadding(const KItemListStyleOption& option) return option.padding * 6; } -#include "kstandarditemlistwidget.moc" diff --git a/src/kitemviews/kstandarditemmodel.cpp b/src/kitemviews/kstandarditemmodel.cpp index e8c1b6204..060440aec 100644 --- a/src/kitemviews/kstandarditemmodel.cpp +++ b/src/kitemviews/kstandarditemmodel.cpp @@ -237,5 +237,3 @@ void KStandardItemModel::onItemRemoved(int index, KStandardItem* removedItem) Q_UNUSED(removedItem); } - -#include "kstandarditemmodel.moc" diff --git a/src/kitemviews/private/kfileitemclipboard.cpp b/src/kitemviews/private/kfileitemclipboard.cpp index 69df5dee7..1fb147716 100644 --- a/src/kitemviews/private/kfileitemclipboard.cpp +++ b/src/kitemviews/private/kfileitemclipboard.cpp @@ -83,4 +83,3 @@ KFileItemClipboard::KFileItemClipboard() : this, &KFileItemClipboard::updateCutItems); } -#include "kfileitemclipboard.moc" diff --git a/src/kitemviews/private/kfileitemmodeldirlister.cpp b/src/kitemviews/private/kfileitemmodeldirlister.cpp index 3d36386a9..9dfd17d8e 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.cpp +++ b/src/kitemviews/private/kfileitemmodeldirlister.cpp @@ -45,4 +45,3 @@ void KFileItemModelDirLister::handleError(KIO::Job* job) } } -#include "kfileitemmodeldirlister.moc" diff --git a/src/kitemviews/private/kitemlistheaderwidget.cpp b/src/kitemviews/private/kitemlistheaderwidget.cpp index 809c4105b..01d0084c8 100644 --- a/src/kitemviews/private/kitemlistheaderwidget.cpp +++ b/src/kitemviews/private/kitemlistheaderwidget.cpp @@ -569,4 +569,3 @@ qreal KItemListHeaderWidget::roleXPosition(const QByteArray& role) const return -1; } -#include "kitemlistheaderwidget.moc" diff --git a/src/kitemviews/private/kitemlistroleeditor.cpp b/src/kitemviews/private/kitemlistroleeditor.cpp index 8d5f514d2..6e7e89c17 100644 --- a/src/kitemviews/private/kitemlistroleeditor.cpp +++ b/src/kitemviews/private/kitemlistroleeditor.cpp @@ -148,4 +148,3 @@ void KItemListRoleEditor::emitRoleEditingFinished() } } -#include "kitemlistroleeditor.moc" diff --git a/src/kitemviews/private/kitemlistrubberband.cpp b/src/kitemviews/private/kitemlistrubberband.cpp index 58567c460..702873126 100644 --- a/src/kitemviews/private/kitemlistrubberband.cpp +++ b/src/kitemviews/private/kitemlistrubberband.cpp @@ -88,4 +88,3 @@ bool KItemListRubberBand::isActive() const return m_active; } -#include "kitemlistrubberband.moc" diff --git a/src/kitemviews/private/kitemlistselectiontoggle.cpp b/src/kitemviews/private/kitemlistselectiontoggle.cpp index accbe5181..c33c15ec2 100644 --- a/src/kitemviews/private/kitemlistselectiontoggle.cpp +++ b/src/kitemviews/private/kitemlistselectiontoggle.cpp @@ -115,4 +115,3 @@ int KItemListSelectionToggle::iconSize() const return iconSize; } -#include "kitemlistselectiontoggle.moc" diff --git a/src/kitemviews/private/kitemlistsmoothscroller.cpp b/src/kitemviews/private/kitemlistsmoothscroller.cpp index 994d86174..24eea0cef 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.cpp +++ b/src/kitemviews/private/kitemlistsmoothscroller.cpp @@ -209,4 +209,3 @@ void KItemListSmoothScroller::handleWheelEvent(QWheelEvent* event) event->accept(); } -#include "kitemlistsmoothscroller.moc" diff --git a/src/kitemviews/private/kitemlistviewanimation.cpp b/src/kitemviews/private/kitemlistviewanimation.cpp index 43eed98c5..336ba38ad 100644 --- a/src/kitemviews/private/kitemlistviewanimation.cpp +++ b/src/kitemviews/private/kitemlistviewanimation.cpp @@ -242,4 +242,3 @@ void KItemListViewAnimation::slotFinished() Q_ASSERT(false); } -#include "kitemlistviewanimation.moc" diff --git a/src/kitemviews/private/kitemlistviewlayouter.cpp b/src/kitemviews/private/kitemlistviewlayouter.cpp index 04325c7d0..e2dcc62e7 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.cpp +++ b/src/kitemviews/private/kitemlistviewlayouter.cpp @@ -621,4 +621,3 @@ qreal KItemListViewLayouter::minimumGroupHeaderWidth() const return 100; } -#include "kitemlistviewlayouter.moc" diff --git a/src/panels/folders/foldersitemlistwidget.cpp b/src/panels/folders/foldersitemlistwidget.cpp index b4f9a5be8..5b2b20698 100644 --- a/src/panels/folders/foldersitemlistwidget.cpp +++ b/src/panels/folders/foldersitemlistwidget.cpp @@ -33,4 +33,3 @@ QPalette::ColorRole FoldersItemListWidget::normalTextColorRole() const return QPalette::WindowText; } -#include "foldersitemlistwidget.moc" diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 0b2ea3888..1f7d007ca 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -328,4 +328,3 @@ void FoldersPanel::updateCurrentItem(int index) m_controller->view()->scrollToItem(index); } -#include "folderspanel.moc" diff --git a/src/panels/folders/treeviewcontextmenu.cpp b/src/panels/folders/treeviewcontextmenu.cpp index 3f69ac22a..ff0801d1a 100644 --- a/src/panels/folders/treeviewcontextmenu.cpp +++ b/src/panels/folders/treeviewcontextmenu.cpp @@ -210,4 +210,3 @@ void TreeViewContextMenu::setAutoScrolling(bool enable) m_parent->setAutoScrolling(enable); } -#include "treeviewcontextmenu.moc" diff --git a/src/panels/information/filemetadataconfigurationdialog.cpp b/src/panels/information/filemetadataconfigurationdialog.cpp index 1ab2bd15c..15f1f4f5f 100644 --- a/src/panels/information/filemetadataconfigurationdialog.cpp +++ b/src/panels/information/filemetadataconfigurationdialog.cpp @@ -99,4 +99,3 @@ QString FileMetaDataConfigurationDialog::description() const return m_descriptionLabel->text(); } -#include "filemetadataconfigurationdialog.moc" diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 4ad1276a5..5c4da7fbc 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -361,4 +361,3 @@ void InformationPanel::init() m_initialized = true; } -#include "informationpanel.moc" diff --git a/src/panels/information/informationpanelcontent.cpp b/src/panels/information/informationpanelcontent.cpp index 1e660d5c9..75052021b 100644 --- a/src/panels/information/informationpanelcontent.cpp +++ b/src/panels/information/informationpanelcontent.cpp @@ -440,4 +440,3 @@ void InformationPanelContent::adjustWidgetSizes(int width) } } -#include "informationpanelcontent.moc" diff --git a/src/panels/information/pixmapviewer.cpp b/src/panels/information/pixmapviewer.cpp index db3a63331..221db8c70 100644 --- a/src/panels/information/pixmapviewer.cpp +++ b/src/panels/information/pixmapviewer.cpp @@ -127,4 +127,3 @@ void PixmapViewer::checkPendingPixmaps() } } -#include "pixmapviewer.moc" diff --git a/src/panels/panel.cpp b/src/panels/panel.cpp index 14b7c0230..767313445 100644 --- a/src/panels/panel.cpp +++ b/src/panels/panel.cpp @@ -76,4 +76,3 @@ void Panel::readSettings() } -#include "panel.moc" diff --git a/src/panels/places/placesitemeditdialog.cpp b/src/panels/places/placesitemeditdialog.cpp index 0a66ef7de..350f39089 100644 --- a/src/panels/places/placesitemeditdialog.cpp +++ b/src/panels/places/placesitemeditdialog.cpp @@ -169,4 +169,3 @@ void PlacesItemEditDialog::initialize() setMainWidget(mainWidget); } -#include "placesitemeditdialog.moc" diff --git a/src/panels/places/placesitemlistgroupheader.cpp b/src/panels/places/placesitemlistgroupheader.cpp index ec7c4b18c..e17fd4d66 100644 --- a/src/panels/places/placesitemlistgroupheader.cpp +++ b/src/panels/places/placesitemlistgroupheader.cpp @@ -42,4 +42,3 @@ QPalette::ColorRole PlacesItemListGroupHeader::normalTextColorRole() const return QPalette::WindowText; } -#include "placesitemlistgroupheader.moc" diff --git a/src/panels/places/placesitemlistwidget.cpp b/src/panels/places/placesitemlistwidget.cpp index e33d1daf9..83b00d798 100644 --- a/src/panels/places/placesitemlistwidget.cpp +++ b/src/panels/places/placesitemlistwidget.cpp @@ -40,4 +40,3 @@ QPalette::ColorRole PlacesItemListWidget::normalTextColorRole() const return QPalette::WindowText; } -#include "placesitemlistwidget.moc" diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 39dd372a8..2c984ee40 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -1228,4 +1228,3 @@ void PlacesItemModel::showModelState() } #endif -#include "placesitemmodel.moc" diff --git a/src/panels/places/placesitemsignalhandler.cpp b/src/panels/places/placesitemsignalhandler.cpp index 54a916de7..c9bc0db3f 100644 --- a/src/panels/places/placesitemsignalhandler.cpp +++ b/src/panels/places/placesitemsignalhandler.cpp @@ -47,4 +47,3 @@ void PlacesItemSignalHandler::onTrashDirListerCompleted() } } -#include "placesitemsignalhandler.moc" diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp index d3614c9ce..487751931 100644 --- a/src/panels/places/placespanel.cpp +++ b/src/panels/places/placespanel.cpp @@ -546,4 +546,3 @@ void PlacesPanel::triggerItem(int index, Qt::MouseButton button) } -#include "placespanel.moc" diff --git a/src/panels/places/placesview.cpp b/src/panels/places/placesview.cpp index a298a5250..7c455b4bc 100644 --- a/src/panels/places/placesview.cpp +++ b/src/panels/places/placesview.cpp @@ -49,4 +49,3 @@ int PlacesView::iconSize() const return option.iconSize; } -#include "placesview.moc" diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index 5c726527e..1ac5925bf 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -195,4 +195,3 @@ void TerminalPanel::slotKonsolePartCurrentDirectoryChanged(const QString& dir) } } -#include "terminalpanel.moc" diff --git a/src/search/dolphinfacetswidget.cpp b/src/search/dolphinfacetswidget.cpp index fa46a50e8..8e1a9c470 100644 --- a/src/search/dolphinfacetswidget.cpp +++ b/src/search/dolphinfacetswidget.cpp @@ -300,4 +300,3 @@ QRadioButton* DolphinFacetsWidget::createRadioButton(const QString& text, return button; } -#include "dolphinfacetswidget.moc" diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 78a3569a9..ae93030ac 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -513,4 +513,3 @@ void DolphinSearchBox::updateFacetsToggleButton() m_facetsToggleButton->setText(facetsIsVisible ? i18nc("action:button", "Fewer Options") : i18nc("action:button", "More Options")); } -#include "dolphinsearchbox.moc" diff --git a/src/settings/additionalinfodialog.cpp b/src/settings/additionalinfodialog.cpp index 910df7b22..9cce603f5 100644 --- a/src/settings/additionalinfodialog.cpp +++ b/src/settings/additionalinfodialog.cpp @@ -110,4 +110,3 @@ void AdditionalInfoDialog::slotOk() } } -#include "additionalinfodialog.moc" diff --git a/src/settings/applyviewpropsjob.cpp b/src/settings/applyviewpropsjob.cpp index 9849216d2..d33d4430f 100644 --- a/src/settings/applyviewpropsjob.cpp +++ b/src/settings/applyviewpropsjob.cpp @@ -76,4 +76,3 @@ void ApplyViewPropsJob::slotResult(KJob* job) emitResult(); } -#include "applyviewpropsjob.moc" diff --git a/src/settings/dolphinsettingsdialog.cpp b/src/settings/dolphinsettingsdialog.cpp index f248335e9..8c20a9148 100644 --- a/src/settings/dolphinsettingsdialog.cpp +++ b/src/settings/dolphinsettingsdialog.cpp @@ -148,4 +148,3 @@ void DolphinSettingsDialog::restoreDefaults() } } -#include "dolphinsettingsdialog.moc" diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index 7633b824f..635a1b2c4 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -141,4 +141,3 @@ void BehaviorSettingsPage::loadSettings() m_renameInline->setChecked(GeneralSettings::renameInline()); } -#include "behaviorsettingspage.moc" diff --git a/src/settings/general/configurepreviewplugindialog.cpp b/src/settings/general/configurepreviewplugindialog.cpp index 090b415e0..ce70e2bad 100644 --- a/src/settings/general/configurepreviewplugindialog.cpp +++ b/src/settings/general/configurepreviewplugindialog.cpp @@ -79,4 +79,3 @@ void ConfigurePreviewPluginDialog::slotOk() } -#include "configurepreviewplugindialog.moc" diff --git a/src/settings/general/confirmationssettingspage.cpp b/src/settings/general/confirmationssettingspage.cpp index c74efedc2..532821159 100644 --- a/src/settings/general/confirmationssettingspage.cpp +++ b/src/settings/general/confirmationssettingspage.cpp @@ -111,4 +111,3 @@ void ConfirmationsSettingsPage::loadSettings() m_confirmClosingMultipleTabs->setChecked(GeneralSettings::confirmClosingMultipleTabs()); } -#include "confirmationssettingspage.moc" diff --git a/src/settings/general/generalsettingspage.cpp b/src/settings/general/generalsettingspage.cpp index 8a8adf84f..3b196e837 100644 --- a/src/settings/general/generalsettingspage.cpp +++ b/src/settings/general/generalsettingspage.cpp @@ -89,4 +89,3 @@ void GeneralSettingsPage::restoreDefaults() } } -#include "generalsettingspage.moc" diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index 5085173a7..428e4fe28 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -201,4 +201,3 @@ void PreviewsSettingsPage::loadSettings() m_remoteFileSizeBox->setValue(maxRemoteMByteSize); } -#include "previewssettingspage.moc" diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp index e9a9a3573..78ee3856b 100644 --- a/src/settings/general/statusbarsettingspage.cpp +++ b/src/settings/general/statusbarsettingspage.cpp @@ -73,4 +73,3 @@ void StatusBarSettingsPage::loadSettings() m_showSpaceInfo->setChecked(GeneralSettings::showSpaceInfo()); } -#include "statusbarsettingspage.moc" diff --git a/src/settings/navigation/navigationsettingspage.cpp b/src/settings/navigation/navigationsettingspage.cpp index 32f437d96..5894599a1 100644 --- a/src/settings/navigation/navigationsettingspage.cpp +++ b/src/settings/navigation/navigationsettingspage.cpp @@ -115,4 +115,3 @@ void NavigationSettingsPage::loadSettings() m_autoExpandFolders->setChecked(GeneralSettings::autoExpandFolders()); } -#include "navigationsettingspage.moc" diff --git a/src/settings/serviceitemdelegate.cpp b/src/settings/serviceitemdelegate.cpp index 5b8b582fe..43406eeda 100644 --- a/src/settings/serviceitemdelegate.cpp +++ b/src/settings/serviceitemdelegate.cpp @@ -129,4 +129,3 @@ void ServiceItemDelegate::slotConfigureButtonClicked() emit requestServiceConfiguration(focusedIndex()); } -#include "serviceitemdelegate.moc" diff --git a/src/settings/servicemodel.cpp b/src/settings/servicemodel.cpp index 315b90dff..e3b015147 100644 --- a/src/settings/servicemodel.cpp +++ b/src/settings/servicemodel.cpp @@ -105,4 +105,3 @@ int ServiceModel::rowCount(const QModelIndex& parent) const return m_items.count(); } -#include "servicemodel.moc" diff --git a/src/settings/services/servicessettingspage.cpp b/src/settings/services/servicessettingspage.cpp index 4110d1f5e..481c8af4a 100644 --- a/src/settings/services/servicessettingspage.cpp +++ b/src/settings/services/servicessettingspage.cpp @@ -273,4 +273,3 @@ void ServicesSettingsPage::addRow(const QString& icon, m_serviceModel->setData(index, checked, Qt::CheckStateRole); } -#include "servicessettingspage.moc" diff --git a/src/settings/settingspagebase.cpp b/src/settings/settingspagebase.cpp index 6f8dcbfb6..70549fd2c 100644 --- a/src/settings/settingspagebase.cpp +++ b/src/settings/settingspagebase.cpp @@ -28,4 +28,3 @@ SettingsPageBase::~SettingsPageBase() {} -#include "settingspagebase.moc" diff --git a/src/settings/startup/startupsettingspage.cpp b/src/settings/startup/startupsettingspage.cpp index 7f8c2d5f5..8e8cf9e73 100644 --- a/src/settings/startup/startupsettingspage.cpp +++ b/src/settings/startup/startupsettingspage.cpp @@ -181,4 +181,3 @@ void StartupSettingsPage::loadSettings() m_filterBar->setChecked(GeneralSettings::filterBar()); } -#include "startupsettingspage.moc" diff --git a/src/settings/trash/trashsettingspage.cpp b/src/settings/trash/trashsettingspage.cpp index d42ae8f0c..bd01d56b5 100644 --- a/src/settings/trash/trashsettingspage.cpp +++ b/src/settings/trash/trashsettingspage.cpp @@ -67,4 +67,3 @@ void TrashSettingsPage::loadSettings() m_proxy->load(); } -#include "trashsettingspage.moc" diff --git a/src/settings/viewmodes/dolphinfontrequester.cpp b/src/settings/viewmodes/dolphinfontrequester.cpp index fe5184a56..660aacdf9 100644 --- a/src/settings/viewmodes/dolphinfontrequester.cpp +++ b/src/settings/viewmodes/dolphinfontrequester.cpp @@ -104,4 +104,3 @@ void DolphinFontRequester::changeMode(int index) emit changed(); } -#include "dolphinfontrequester.moc" diff --git a/src/settings/viewmodes/viewsettingspage.cpp b/src/settings/viewmodes/viewsettingspage.cpp index dfce43b4d..941b211ef 100644 --- a/src/settings/viewmodes/viewsettingspage.cpp +++ b/src/settings/viewmodes/viewsettingspage.cpp @@ -80,4 +80,3 @@ void ViewSettingsPage::restoreDefaults() } } -#include "viewsettingspage.moc" diff --git a/src/settings/viewmodes/viewsettingstab.cpp b/src/settings/viewmodes/viewsettingstab.cpp index 70238e82f..6f442099f 100644 --- a/src/settings/viewmodes/viewsettingstab.cpp +++ b/src/settings/viewmodes/viewsettingstab.cpp @@ -289,4 +289,4 @@ void ViewSettingsTab::showToolTip(QSlider* slider, int value) QHelpEvent toolTipEvent(QEvent::ToolTip, QPoint(0, 0), slider->mapToGlobal(global)); QApplication::sendEvent(slider, &toolTipEvent); } -#include "viewsettingstab.moc" + diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index 593d1c4a8..41a39f2a7 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -408,4 +408,3 @@ void ViewPropertiesDialog::loadSettings() markAsDirty(false); } -#include "viewpropertiesdialog.moc" diff --git a/src/settings/viewpropsprogressinfo.cpp b/src/settings/viewpropsprogressinfo.cpp index a4a45da26..13998cf87 100644 --- a/src/settings/viewpropsprogressinfo.cpp +++ b/src/settings/viewpropsprogressinfo.cpp @@ -145,4 +145,3 @@ void ViewPropsProgressInfo::cancelApplying() } } -#include "viewpropsprogressinfo.moc" diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 9f17c8ecd..21f657ada 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -356,4 +356,3 @@ void DolphinStatusBar::setExtensionsVisible(bool visible) m_zoomSlider->setVisible(showZoomSlider); } -#include "dolphinstatusbar.moc" diff --git a/src/statusbar/statusbarspaceinfo.cpp b/src/statusbar/statusbarspaceinfo.cpp index 3692947b1..ea8b4704c 100644 --- a/src/statusbar/statusbarspaceinfo.cpp +++ b/src/statusbar/statusbarspaceinfo.cpp @@ -87,4 +87,3 @@ void StatusBarSpaceInfo::slotValuesChanged() } } -#include "statusbarspaceinfo.moc" diff --git a/src/views/dolphinfileitemlistwidget.cpp b/src/views/dolphinfileitemlistwidget.cpp index 33ee6a277..f4efa5233 100644 --- a/src/views/dolphinfileitemlistwidget.cpp +++ b/src/views/dolphinfileitemlistwidget.cpp @@ -126,4 +126,3 @@ QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin2::ItemV return KIcon(iconName).pixmap(QSize(overlayHeight, overlayHeight)); } -#include "dolphinfileitemlistwidget.moc" diff --git a/src/views/dolphinitemlistview.cpp b/src/views/dolphinitemlistview.cpp index 9f600e43f..eeef45d92 100644 --- a/src/views/dolphinitemlistview.cpp +++ b/src/views/dolphinitemlistview.cpp @@ -263,4 +263,3 @@ ViewModeSettings::ViewMode DolphinItemListView::viewMode() const return mode; } -#include "dolphinitemlistview.moc" diff --git a/src/views/dolphinnewfilemenuobserver.cpp b/src/views/dolphinnewfilemenuobserver.cpp index 353f1f33c..855f2675a 100644 --- a/src/views/dolphinnewfilemenuobserver.cpp +++ b/src/views/dolphinnewfilemenuobserver.cpp @@ -63,4 +63,3 @@ DolphinNewFileMenuObserver::~DolphinNewFileMenuObserver() { } -#include "dolphinnewfilemenuobserver.moc" diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp index bf00e33fe..ceb189494 100644 --- a/src/views/dolphinremoteencoding.cpp +++ b/src/views/dolphinremoteencoding.cpp @@ -235,4 +235,3 @@ void DolphinRemoteEncoding::updateView() m_actionHandler->currentView()->reload(); } -#include "dolphinremoteencoding.moc" diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 6d718f02c..ce8e08210 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1683,4 +1683,3 @@ KUrl DolphinView::viewPropertiesUrl() const return url; } -#include "dolphinview.moc" diff --git a/src/views/renamedialog.cpp b/src/views/renamedialog.cpp index 3b94e01e5..bd0a31d11 100644 --- a/src/views/renamedialog.cpp +++ b/src/views/renamedialog.cpp @@ -219,4 +219,3 @@ QString RenameDialog::indexedName(const QString& name, int index, const QChar& i return newName; } -#include "renamedialog.moc" diff --git a/src/views/tooltips/filemetadatatooltip.cpp b/src/views/tooltips/filemetadatatooltip.cpp index 9efbe8a4f..afb1a32d3 100644 --- a/src/views/tooltips/filemetadatatooltip.cpp +++ b/src/views/tooltips/filemetadatatooltip.cpp @@ -180,4 +180,3 @@ void FileMetaDataToolTip::showEvent(QShowEvent *) KWindowEffects::enableBlurBehind(winId(), true, mask()); } -#include "filemetadatatooltip.moc" diff --git a/src/views/tooltips/tooltipmanager.cpp b/src/views/tooltips/tooltipmanager.cpp index 1f213dc5c..c005979d5 100644 --- a/src/views/tooltips/tooltipmanager.cpp +++ b/src/views/tooltips/tooltipmanager.cpp @@ -267,4 +267,3 @@ void ToolTipManager::showToolTip() m_toolTipRequested = false; } -#include "tooltipmanager.moc" diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index 51a277831..7b806a592 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -76,4 +76,3 @@ QMap > UpdateItemStatesThrea return m_itemStates; } -#include "updateitemstatesthread.moc" diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 9033e19da..c41803c16 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -366,4 +366,3 @@ bool VersionControlObserver::isVersioned() const return m_versionedDirectory && m_plugin; } -#include "versioncontrolobserver.moc" diff --git a/src/views/viewmodecontroller.cpp b/src/views/viewmodecontroller.cpp index 26e181888..da6066887 100644 --- a/src/views/viewmodecontroller.cpp +++ b/src/views/viewmodecontroller.cpp @@ -85,4 +85,3 @@ void ViewModeController::setUrl(const KUrl& url) } } -#include "viewmodecontroller.moc" -- cgit v1.3 From 9c6c0089c945241be8eff7225916f2b54d84c838 Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 15 Oct 2014 17:42:42 +0200 Subject: Replaced the ItemState structure with QPair --- src/views/versioncontrol/updateitemstatesthread.cpp | 9 ++++++--- src/views/versioncontrol/versioncontrolobserver.cpp | 12 +++++++----- src/views/versioncontrol/versioncontrolobserver.h | 6 +----- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src/views/versioncontrol/updateitemstatesthread.cpp') diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index 7b806a592..4f0122e0f 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -57,12 +57,15 @@ void UpdateItemStatesThread::run() KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); if (pluginV2) { for (int i = 0; i < count; ++i) { - items[i].version = pluginV2->itemVersion(items[i].item); + const KFileItem& item = items.at(i).first; + const KVersionControlPlugin2::ItemVersion version = pluginV2->itemVersion(item); + items[i].second = version; } } else { for (int i = 0; i < count; ++i) { - const KVersionControlPlugin::VersionState state = m_plugin->versionState(items[i].item); - items[i].version = static_cast(state); + const KFileItem& item = items.at(i).first; + const KVersionControlPlugin::VersionState state = m_plugin->versionState(item); + items[i].second = static_cast(state); } } } diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index c41803c16..c7677de53 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -205,9 +205,11 @@ void VersionControlObserver::slotThreadFinished() const QVector& items = it.value(); foreach (const ItemState& item, items) { + const KFileItem& fileItem = item.first; + const KVersionControlPlugin2::ItemVersion version = item.second; QHash values; - values.insert("version", QVariant(item.version)); - m_model->setData(m_model->index(item.item), values); + values.insert("version", QVariant(version)); + m_model->setData(m_model->index(fileItem), values); } } @@ -266,8 +268,8 @@ int VersionControlObserver::createItemStatesList(QMapfileItem(index); - itemState.version = KVersionControlPlugin2::UnversionedVersion; + itemState.first = m_model->fileItem(index); + itemState.second = KVersionControlPlugin2::UnversionedVersion; items.append(itemState); } else if (expansionLevel > currentExpansionLevel) { @@ -279,7 +281,7 @@ int VersionControlObserver::createItemStatesList(QMap 0) { - const KUrl& url = items.first().item.url(); + const KUrl& url = items.first().first.url(); itemStates.insert(url.directory(KUrl::AppendTrailingSlash), items); } diff --git a/src/views/versioncontrol/versioncontrolobserver.h b/src/views/versioncontrol/versioncontrolobserver.h index 2c07b0614..562a599d2 100644 --- a/src/views/versioncontrol/versioncontrolobserver.h +++ b/src/views/versioncontrol/versioncontrolobserver.h @@ -101,11 +101,7 @@ private slots: void slotThreadFinished(); private: - struct ItemState - { - KFileItem item; - KVersionControlPlugin2::ItemVersion version; - }; + typedef QPair ItemState; void updateItemStates(); -- cgit v1.3 From 25751088c33ce507096a3e25ee1eeaa7de38c76b Mon Sep 17 00:00:00 2001 From: Emmanuel Pescosta Date: Wed, 25 Feb 2015 12:12:55 +0100 Subject: Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687 --- CMakeLists.txt | 42 +++- DolphinVcsConfig.cmake.in | 6 + src/CMakeLists.txt | 50 ++++- src/dolphinnewfilemenu.h | 4 +- src/dolphinremoveaction.h | 4 +- src/kitemviews/kfileitemlistview.h | 4 +- src/kitemviews/kfileitemlistwidget.h | 6 +- src/kitemviews/kfileitemmodel.h | 4 +- src/kitemviews/kfileitemmodelrolesupdater.cpp | 1 + src/kitemviews/kfileitemmodelrolesupdater.h | 4 +- src/kitemviews/kitemlistcontainer.h | 4 +- src/kitemviews/kitemlistcontroller.h | 4 +- src/kitemviews/kitemlistgroupheader.h | 4 +- src/kitemviews/kitemlistheader.h | 4 +- src/kitemviews/kitemlistselectionmanager.h | 4 +- src/kitemviews/kitemliststyleoption.h | 4 +- src/kitemviews/kitemlistview.h | 10 +- src/kitemviews/kitemlistviewaccessible.h | 8 +- src/kitemviews/kitemlistwidget.h | 6 +- src/kitemviews/kitemmodelbase.h | 4 +- src/kitemviews/kstandarditem.h | 4 +- src/kitemviews/kstandarditemlistgroupheader.h | 4 +- src/kitemviews/kstandarditemlistview.h | 4 +- src/kitemviews/kstandarditemlistwidget.h | 6 +- src/kitemviews/kstandarditemmodel.h | 4 +- src/kitemviews/private/kbaloorolesprovider.h | 4 +- src/kitemviews/private/kfileitemclipboard.h | 4 +- src/kitemviews/private/kfileitemmodeldirlister.h | 4 +- src/kitemviews/private/kfileitemmodelfilter.h | 4 +- src/kitemviews/private/kitemlistheaderwidget.h | 4 +- .../private/kitemlistkeyboardsearchmanager.h | 4 +- src/kitemviews/private/kitemlistroleeditor.h | 4 +- src/kitemviews/private/kitemlistrubberband.h | 4 +- src/kitemviews/private/kitemlistselectiontoggle.h | 4 +- src/kitemviews/private/kitemlistsizehintresolver.h | 4 +- src/kitemviews/private/kitemlistsmoothscroller.h | 4 +- src/kitemviews/private/kitemlistviewanimation.h | 4 +- src/kitemviews/private/kitemlistviewlayouter.h | 4 +- src/kitemviews/private/kpixmapmodifier.h | 4 +- src/settings/viewpropertiesdialog.h | 4 +- src/tests/CMakeLists.txt | 2 +- src/views/dolphinfileitemlistwidget.cpp | 29 ++- src/views/dolphinfileitemlistwidget.h | 8 +- src/views/dolphinitemlistview.h | 4 +- src/views/dolphinnewfilemenuobserver.h | 4 +- src/views/dolphinremoteencoding.h | 4 +- src/views/dolphinview.h | 4 +- src/views/dolphinviewactionhandler.h | 4 +- src/views/draganddrophelper.h | 4 +- src/views/renamedialog.h | 4 +- src/views/versioncontrol/kversioncontrolplugin.cpp | 29 +++ src/views/versioncontrol/kversioncontrolplugin.h | 223 +++++++++++++++++++++ .../versioncontrol/updateitemstatesthread.cpp | 20 +- src/views/versioncontrol/updateitemstatesthread.h | 6 +- .../versioncontrol/versioncontrolobserver.cpp | 41 +--- src/views/versioncontrol/versioncontrolobserver.h | 10 +- src/views/viewmodecontroller.h | 4 +- src/views/viewproperties.h | 4 +- 58 files changed, 469 insertions(+), 194 deletions(-) create mode 100644 DolphinVcsConfig.cmake.in create mode 100644 src/views/versioncontrol/kversioncontrolplugin.cpp create mode 100644 src/views/versioncontrol/kversioncontrolplugin.h (limited to 'src/views/versioncontrol/updateitemstatesthread.cpp') diff --git a/CMakeLists.txt b/CMakeLists.txt index 570910497..3a3ab6d4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,18 +3,25 @@ cmake_minimum_required(VERSION 2.8.12) project(Dolphin) # ECM setup -find_package(ECM 1.2.0 CONFIG REQUIRED) +find_package(ECM 1.6.0 CONFIG REQUIRED) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) set(DOLPHIN_VERSION "4.97.0") include(ECMSetupVersion) +include(ECMGenerateHeaders) include(GenerateExportHeader) include(FeatureSummary) include(KDEInstallDirs) include(KDECMakeSettings) include(KDEFrameworkCompilerSettings) +ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINVCS + VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_version.h" + PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfigVersion.cmake" + SOVERSION 5 +) + ecm_setup_version(${DOLPHIN_VERSION} VARIABLE_PREFIX DOLPHINPRIVATE SOVERSION 5 ) @@ -24,12 +31,6 @@ find_package(KF5 COMPONENTS Activities) find_package(Phonon4Qt5 CONFIG REQUIRED) -if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") - find_package(KF5Konq CONFIG REQUIRED) -else() - include_directories(${LibKonq_SOURCE_DIR}/src) -endif() - find_package(KF5Baloo 4.97) set_package_properties(KF5Baloo PROPERTIES DESCRIPTION "Baloo Core libraries" URL "http://www.kde.org" @@ -58,6 +59,33 @@ endif() add_subdirectory(src) add_subdirectory(docs) +# CMake files +set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/Dolphin") + +ecm_configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/DolphinVcsConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfig.cmake" + INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR} +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/DolphinVcsConfigVersion.cmake" + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + COMPONENT Devel +) + +install(EXPORT DolphinVcsTargets + DESTINATION "${CMAKECONFIG_INSTALL_DIR}" + FILE DolphinVcsTargets.cmake +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/dolphinvcs_version.h" + DESTINATION "${KDE_INSTALL_INCLUDEDIR}/Dolphin" + COMPONENT Devel +) + # TODO Remove the if/endif lines if Dolphin is split. if ("${CMAKE_SOURCE_DIR}" STREQUAL "${Dolphin_SOURCE_DIR}") feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/DolphinVcsConfig.cmake.in b/DolphinVcsConfig.cmake.in new file mode 100644 index 000000000..7e7a2296f --- /dev/null +++ b/DolphinVcsConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +find_dependency(Qt5Widgets) +find_dependency(KF5KIO) + +include("${CMAKE_CURRENT_LIST_DIR}/DolphinVcsTargets.cmake") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ea21f1af2..2b65671da 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,6 +12,42 @@ endif() configure_file(config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h) +########################################## + +set(dolphinvcs_LIB_SRCS + views/versioncontrol/kversioncontrolplugin.cpp +) + +add_library(dolphinvcs ${dolphinvcs_LIB_SRCS}) + +generate_export_header(dolphinvcs BASE_NAME dolphin) + +target_link_libraries( + dolphinvcs PUBLIC + Qt5::Widgets + KF5::KIOCore +) + +set_target_properties(dolphinvcs PROPERTIES + VERSION ${DOLPHINVCS_VERSION_STRING} + SOVERSION ${DOLPHINVCS_SOVERSION} + EXPORT_NAME DolphinVcs +) + +ecm_generate_headers(dolphinvcs_LIB_HEADERS + HEADER_NAMES + KVersionControlPlugin + + RELATIVE "views/versioncontrol" + REQUIRED_HEADERS dolphinvcs_LIB_HEADERS +) + +install(TARGETS dolphinvcs EXPORT DolphinVcsTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) + +install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dolphin_export.h DESTINATION ${KDE_INSTALL_INCLUDEDIR} COMPONENT Devel) +install(FILES ${dolphinvcs_LIB_HEADERS} DESTINATION "${KDE_INSTALL_INCLUDEDIR}/Dolphin" COMPONENT Devel) + ########### next target ############### set(dolphinprivate_LIB_SRCS @@ -93,13 +129,10 @@ kconfig_add_kcfg_files(dolphinprivate_LIB_SRCS GENERATE_MOC add_library(dolphinprivate ${dolphinprivate_LIB_SRCS}) -generate_export_header(dolphinprivate BASE_NAME libdolphinprivate - EXPORT_FILE_NAME libdolphin_export.h) - target_link_libraries( dolphinprivate PUBLIC + dolphinvcs KF5::KDELibs4Support - KF5::Konq KF5::NewStuff ) @@ -122,7 +155,7 @@ set_target_properties(dolphinprivate PROPERTIES SOVERSION ${DOLPHINPRIVATE_SOVERSION} ) -install(TARGETS dolphinprivate ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS dolphinprivate ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ########################################## @@ -136,7 +169,6 @@ add_library(dolphinpart MODULE ${dolphinpart_SRCS}) target_link_libraries(dolphinpart dolphinprivate - KF5::Konq KF5::KDELibs4Support ) @@ -144,7 +176,6 @@ install(TARGETS dolphinpart DESTINATION ${PLUGIN_INSTALL_DIR}) install(FILES dolphinpart.rc DESTINATION ${CMAKE_INSTALL_KXMLGUI5DIR}/dolphinpart) install(FILES dolphinpart.desktop DESTINATION ${SERVICES_INSTALL_DIR}) -install(FILES views/versioncontrol/fileviewversioncontrolplugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) ########################################## @@ -230,7 +261,6 @@ kf5_add_kdeinit_executable(dolphin ${dolphin_SRCS}) target_include_directories(kdeinit_dolphin PRIVATE ${PHONON_INCLUDES}) target_link_libraries(kdeinit_dolphin - KF5::Konq dolphinprivate KF5::NewStuff KF5::Parts @@ -251,8 +281,8 @@ if (KF5Activities_FOUND) ) endif() -install(TARGETS kdeinit_dolphin ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) -install(TARGETS dolphin ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS kdeinit_dolphin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) +install(TARGETS dolphin ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ########################################## diff --git a/src/dolphinnewfilemenu.h b/src/dolphinnewfilemenu.h index 254571eb9..9f1cb5599 100644 --- a/src/dolphinnewfilemenu.h +++ b/src/dolphinnewfilemenu.h @@ -23,7 +23,7 @@ #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class KJob; @@ -35,7 +35,7 @@ class KJob; * All errors are shown in the status bar of Dolphin * instead as modal error dialog with an OK button. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinNewFileMenu : public KNewFileMenu +class DOLPHIN_EXPORT DolphinNewFileMenu : public KNewFileMenu { Q_OBJECT diff --git a/src/dolphinremoveaction.h b/src/dolphinremoveaction.h index 1a123ace5..85f404318 100644 --- a/src/dolphinremoveaction.h +++ b/src/dolphinremoveaction.h @@ -20,7 +20,7 @@ #ifndef DOLPHINREMOVEACTION_H #define DOLPHINREMOVEACTION_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -34,7 +34,7 @@ * This class expects the presence of both the "move_to_trash" and "delete" * actions in @ref collection. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinRemoveAction : public QAction +class DOLPHIN_EXPORT DolphinRemoveAction : public QAction { Q_OBJECT public: diff --git a/src/kitemviews/kfileitemlistview.h b/src/kitemviews/kfileitemlistview.h index 72688893e..84aa17d89 100644 --- a/src/kitemviews/kfileitemlistview.h +++ b/src/kitemviews/kfileitemlistview.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMLISTVIEW_H #define KFILEITEMLISTVIEW_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -36,7 +36,7 @@ class QTimer; * KItemListView::setWidgetCreator() and KItemListView::setGroupHeaderCreator() * to apply customized generators. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemListView : public KStandardItemListView +class DOLPHIN_EXPORT KFileItemListView : public KStandardItemListView { Q_OBJECT diff --git a/src/kitemviews/kfileitemlistwidget.h b/src/kitemviews/kfileitemlistwidget.h index 32959e4f6..07ca59b44 100644 --- a/src/kitemviews/kfileitemlistwidget.h +++ b/src/kitemviews/kfileitemlistwidget.h @@ -20,11 +20,11 @@ #ifndef KFILEITEMLISTWIDGET_H #define KFILEITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include -class LIBDOLPHINPRIVATE_EXPORT KFileItemListWidgetInformant : public KStandardItemListWidgetInformant +class DOLPHIN_EXPORT KFileItemListWidgetInformant : public KStandardItemListWidgetInformant { public: KFileItemListWidgetInformant(); @@ -37,7 +37,7 @@ protected: virtual QFont customizedFontForLinks(const QFont& baseFont) const Q_DECL_OVERRIDE; }; -class LIBDOLPHINPRIVATE_EXPORT KFileItemListWidget : public KStandardItemListWidget +class DOLPHIN_EXPORT KFileItemListWidget : public KStandardItemListWidget { Q_OBJECT diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index 8e36294e9..167f508cf 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMMODEL_H #define KFILEITEMMODEL_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include @@ -43,7 +43,7 @@ class QTimer; * Recursive expansion of sub-directories is supported by * KFileItemModel::setExpanded(). */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModel : public KItemModelBase +class DOLPHIN_EXPORT KFileItemModel : public KItemModelBase { Q_OBJECT diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index f17a77e0a..c18d65892 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index 6c82dbe4a..216b0a501 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -25,7 +25,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -87,7 +87,7 @@ namespace KIO { * 3. Finally, the entire process is repeated for any items that might have * changed in the mean time. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModelRolesUpdater : public QObject +class DOLPHIN_EXPORT KFileItemModelRolesUpdater : public QObject { Q_OBJECT diff --git a/src/kitemviews/kitemlistcontainer.h b/src/kitemviews/kitemlistcontainer.h index 6f2851b3e..9fc3d4957 100644 --- a/src/kitemviews/kitemlistcontainer.h +++ b/src/kitemviews/kitemlistcontainer.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTCONTAINER_H #define KITEMLISTCONTAINER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -39,7 +39,7 @@ class KItemModelBase; * * @see KItemListController */ -class LIBDOLPHINPRIVATE_EXPORT KItemListContainer : public QAbstractScrollArea +class DOLPHIN_EXPORT KItemListContainer : public QAbstractScrollArea { Q_OBJECT diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h index 2824a1fc9..b8a93edac 100644 --- a/src/kitemviews/kitemlistcontroller.h +++ b/src/kitemviews/kitemlistcontroller.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTCONTROLLER_H #define KITEMLISTCONTROLLER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include "kitemset.h" @@ -56,7 +56,7 @@ class QTransform; * @see KItemModelBase * @see KItemListSelectionManager */ -class LIBDOLPHINPRIVATE_EXPORT KItemListController : public QObject +class DOLPHIN_EXPORT KItemListController : public QObject { Q_OBJECT Q_ENUMS(SelectionBehavior) diff --git a/src/kitemviews/kitemlistgroupheader.h b/src/kitemviews/kitemlistgroupheader.h index c89da5027..4612bc4da 100644 --- a/src/kitemviews/kitemlistgroupheader.h +++ b/src/kitemviews/kitemlistgroupheader.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTGROUPHEADER_H #define KITEMLISTGROUPHEADER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -37,7 +37,7 @@ class KItemListView; * the method paint() and draw the role within the given roleBounds() with * the color roleColor(). */ -class LIBDOLPHINPRIVATE_EXPORT KItemListGroupHeader : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListGroupHeader : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/kitemlistheader.h b/src/kitemviews/kitemlistheader.h index b361b912b..cc2b74793 100644 --- a/src/kitemviews/kitemlistheader.h +++ b/src/kitemviews/kitemlistheader.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTHEADER_H #define KITEMLISTHEADER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -33,7 +33,7 @@ class KItemListView; * Each column of the header represents a visible role * accessible by KItemListView::visibleRoles(). */ -class LIBDOLPHINPRIVATE_EXPORT KItemListHeader : public QObject +class DOLPHIN_EXPORT KItemListHeader : public QObject { Q_OBJECT diff --git a/src/kitemviews/kitemlistselectionmanager.h b/src/kitemviews/kitemlistselectionmanager.h index a8318388c..16761428b 100644 --- a/src/kitemviews/kitemlistselectionmanager.h +++ b/src/kitemviews/kitemlistselectionmanager.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTSELECTIONMANAGER_H #define KITEMLISTSELECTIONMANAGER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -35,7 +35,7 @@ class KItemModelBase; /** * @brief Allows to select and deselect items of a KItemListView. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSelectionManager : public QObject +class DOLPHIN_EXPORT KItemListSelectionManager : public QObject { Q_OBJECT diff --git a/src/kitemviews/kitemliststyleoption.h b/src/kitemviews/kitemliststyleoption.h index 9290dc341..09b787c27 100644 --- a/src/kitemviews/kitemliststyleoption.h +++ b/src/kitemviews/kitemliststyleoption.h @@ -20,14 +20,14 @@ #ifndef KITEMLISTSTYLEOPTION_H #define KITEMLISTSTYLEOPTION_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include #include -class LIBDOLPHINPRIVATE_EXPORT KItemListStyleOption +class DOLPHIN_EXPORT KItemListStyleOption { public: KItemListStyleOption(); diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index 8130e45ed..f20180289 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTVIEW_H #define KITEMLISTVIEW_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -59,7 +59,7 @@ class QTimer; * @see KItemListWidget * @see KItemModelBase */ -class LIBDOLPHINPRIVATE_EXPORT KItemListView : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListView : public QGraphicsWidget { Q_OBJECT @@ -769,7 +769,7 @@ private: * KItemListWidgetCreatorBase and KItemListGroupHeaderCreatorBase. * @internal */ -class LIBDOLPHINPRIVATE_EXPORT KItemListCreatorBase +class DOLPHIN_EXPORT KItemListCreatorBase { public: virtual ~KItemListCreatorBase(); @@ -793,7 +793,7 @@ private: * expensive instantiations and deletions of KItemListWidgets by recycling existing widget * instances. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidgetCreatorBase : public KItemListCreatorBase +class DOLPHIN_EXPORT KItemListWidgetCreatorBase : public KItemListCreatorBase { public: virtual ~KItemListWidgetCreatorBase(); @@ -875,7 +875,7 @@ qreal KItemListWidgetCreator::preferredRoleColumnWidth(const QByteArray& role * The intention of the group-header creator is to prevent repetitive and expensive instantiations and * deletions of KItemListGroupHeaders by recycling existing header instances. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListGroupHeaderCreatorBase : public KItemListCreatorBase +class DOLPHIN_EXPORT KItemListGroupHeaderCreatorBase : public KItemListCreatorBase { public: virtual ~KItemListGroupHeaderCreatorBase(); diff --git a/src/kitemviews/kitemlistviewaccessible.h b/src/kitemviews/kitemlistviewaccessible.h index 28b0be4e6..afef2d5fe 100644 --- a/src/kitemviews/kitemlistviewaccessible.h +++ b/src/kitemviews/kitemlistviewaccessible.h @@ -22,7 +22,7 @@ #ifndef QT_NO_ACCESSIBILITY -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -32,7 +32,7 @@ class KItemListView; class KItemListContainer; -class LIBDOLPHINPRIVATE_EXPORT KItemListViewAccessible: public QAccessibleObject, public QAccessibleTableInterface +class DOLPHIN_EXPORT KItemListViewAccessible: public QAccessibleObject, public QAccessibleTableInterface { public: explicit KItemListViewAccessible(KItemListView* view); @@ -89,7 +89,7 @@ private: mutable QVector m_cells; }; -class LIBDOLPHINPRIVATE_EXPORT KItemListAccessibleCell: public QAccessibleInterface, public QAccessibleTableCellInterface +class DOLPHIN_EXPORT KItemListAccessibleCell: public QAccessibleInterface, public QAccessibleTableCellInterface { public: KItemListAccessibleCell(KItemListView* view, int m_index); @@ -128,7 +128,7 @@ private: int m_index; }; -class LIBDOLPHINPRIVATE_EXPORT KItemListContainerAccessible : public QAccessibleWidget +class DOLPHIN_EXPORT KItemListContainerAccessible : public QAccessibleWidget { public: explicit KItemListContainerAccessible(KItemListContainer* container); diff --git a/src/kitemviews/kitemlistwidget.h b/src/kitemviews/kitemlistwidget.h index 723847c43..ae99a1f29 100644 --- a/src/kitemviews/kitemlistwidget.h +++ b/src/kitemviews/kitemlistwidget.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTWIDGET_H #define KITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -43,7 +43,7 @@ class QPropertyAnimation; * size for the invisible items must be accessible. KItemListWidgetInformant * provides this information. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidgetInformant +class DOLPHIN_EXPORT KItemListWidgetInformant { public: KItemListWidgetInformant(); @@ -63,7 +63,7 @@ public: * All properties are set by KItemListView, for each property there is a corresponding * virtual protected method that allows to react on property changes. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListWidget : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListWidget : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index e46d761fc..bd5ca1d65 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -23,7 +23,7 @@ #ifndef KITEMMODELBASE_H #define KITEMMODELBASE_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -49,7 +49,7 @@ class QMimeData; * Also optionally it is possible to provide a tree of items by implementing the methods * setExpanded(), isExpanded(), isExpandable() and expandedParentsCount(). */ -class LIBDOLPHINPRIVATE_EXPORT KItemModelBase : public QObject +class DOLPHIN_EXPORT KItemModelBase : public QObject { Q_OBJECT diff --git a/src/kitemviews/kstandarditem.h b/src/kitemviews/kstandarditem.h index b1d5edf2e..5bb2bb36f 100644 --- a/src/kitemviews/kstandarditem.h +++ b/src/kitemviews/kstandarditem.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEM_H #define KSTANDARDITEM_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -36,7 +36,7 @@ class KStandardItemModel; * used roles. It is possible to assign values for custom * roles by using setDataValue(). */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItem +class DOLPHIN_EXPORT KStandardItem { public: diff --git a/src/kitemviews/kstandarditemlistgroupheader.h b/src/kitemviews/kstandarditemlistgroupheader.h index caf906ddf..f0eacfd49 100644 --- a/src/kitemviews/kstandarditemlistgroupheader.h +++ b/src/kitemviews/kstandarditemlistgroupheader.h @@ -20,14 +20,14 @@ #ifndef KSTANDARDITEMLISTGROUPHEADER_H #define KSTANDARDITEMLISTGROUPHEADER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListGroupHeader : public KItemListGroupHeader +class DOLPHIN_EXPORT KStandardItemListGroupHeader : public KItemListGroupHeader { Q_OBJECT diff --git a/src/kitemviews/kstandarditemlistview.h b/src/kitemviews/kstandarditemlistview.h index 9fc43a940..2e4c7a0a0 100644 --- a/src/kitemviews/kstandarditemlistview.h +++ b/src/kitemviews/kstandarditemlistview.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMLISTVIEW_H #define KSTANDARDITEMLISTVIEW_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -40,7 +40,7 @@ * KItemListContainer* container = new KItemListContainer(controller, parentWidget); * */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListView : public KItemListView +class DOLPHIN_EXPORT KStandardItemListView : public KItemListView { Q_OBJECT diff --git a/src/kitemviews/kstandarditemlistwidget.h b/src/kitemviews/kstandarditemlistwidget.h index 8e61d06b4..826452255 100644 --- a/src/kitemviews/kstandarditemlistwidget.h +++ b/src/kitemviews/kstandarditemlistwidget.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMLISTWIDGET_H #define KSTANDARDITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -32,7 +32,7 @@ class KItemListRoleEditor; class KItemListStyleOption; class KItemListView; -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListWidgetInformant : public KItemListWidgetInformant +class DOLPHIN_EXPORT KStandardItemListWidgetInformant : public KItemListWidgetInformant { public: KStandardItemListWidgetInformant(); @@ -83,7 +83,7 @@ protected: /** * @brief Itemlist widget implementation for KStandardItemView and KStandardItemModel. */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItemListWidget : public KItemListWidget +class DOLPHIN_EXPORT KStandardItemListWidget : public KItemListWidget { Q_OBJECT diff --git a/src/kitemviews/kstandarditemmodel.h b/src/kitemviews/kstandarditemmodel.h index 3b5f5bd39..58c5a5d88 100644 --- a/src/kitemviews/kstandarditemmodel.h +++ b/src/kitemviews/kstandarditemmodel.h @@ -20,7 +20,7 @@ #ifndef KSTANDARDITEMMODEL_H #define KSTANDARDITEMMODEL_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include @@ -35,7 +35,7 @@ class KStandardItem; * * @see KStandardItem */ -class LIBDOLPHINPRIVATE_EXPORT KStandardItemModel : public KItemModelBase +class DOLPHIN_EXPORT KStandardItemModel : public KItemModelBase { Q_OBJECT diff --git a/src/kitemviews/private/kbaloorolesprovider.h b/src/kitemviews/private/kbaloorolesprovider.h index ef073a367..9673bff4f 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 "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -36,7 +36,7 @@ namespace Baloo { * Is a helper class for KFileItemModelRolesUpdater to retrieve roles that * are only accessible with Baloo. */ -class LIBDOLPHINPRIVATE_EXPORT KBalooRolesProvider +class DOLPHIN_EXPORT KBalooRolesProvider { public: static KBalooRolesProvider& instance(); diff --git a/src/kitemviews/private/kfileitemclipboard.h b/src/kitemviews/private/kfileitemclipboard.h index d02fc0d47..3ee50d661 100644 --- a/src/kitemviews/private/kfileitemclipboard.h +++ b/src/kitemviews/private/kfileitemclipboard.h @@ -25,13 +25,13 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" /** * @brief Wrapper for QClipboard to provide fast access for checking * whether a KFileItem has been clipped. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemClipboard : public QObject +class DOLPHIN_EXPORT KFileItemClipboard : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kfileitemmodeldirlister.h b/src/kitemviews/private/kfileitemmodeldirlister.h index a9c8c845a..c2c621aed 100644 --- a/src/kitemviews/private/kfileitemmodeldirlister.h +++ b/src/kitemviews/private/kfileitemmodeldirlister.h @@ -20,7 +20,7 @@ #ifndef KFILEITEMMODELDIRLISTER_H #define KFILEITEMMODELDIRLISTER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -29,7 +29,7 @@ * error occurred instead of showing an error dialog. * KDirLister::autoErrorHandlingEnabled() is set to false. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModelDirLister : public KDirLister +class DOLPHIN_EXPORT KFileItemModelDirLister : public KDirLister { Q_OBJECT diff --git a/src/kitemviews/private/kfileitemmodelfilter.h b/src/kitemviews/private/kfileitemmodelfilter.h index b26e31a00..67c1c280c 100644 --- a/src/kitemviews/private/kfileitemmodelfilter.h +++ b/src/kitemviews/private/kfileitemmodelfilter.h @@ -21,7 +21,7 @@ #ifndef KFILEITEMMODELFILTER_H #define KFILEITEMMODELFILTER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include class KFileItem; @@ -35,7 +35,7 @@ class QRegExp; * property of the KFileItem, but this might get extended in * future. */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModelFilter +class DOLPHIN_EXPORT KFileItemModelFilter { public: diff --git a/src/kitemviews/private/kitemlistheaderwidget.h b/src/kitemviews/private/kitemlistheaderwidget.h index 74c9ac518..307def74d 100644 --- a/src/kitemviews/private/kitemlistheaderwidget.h +++ b/src/kitemviews/private/kitemlistheaderwidget.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTHEADERWIDGET_H #define KITEMLISTHEADERWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include @@ -33,7 +33,7 @@ class KItemModelBase; * The widget is an internal API, the user of KItemListView may only access the * class KItemListHeader. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListHeaderWidget : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListHeaderWidget : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h index 1f315dabd..2a14ca470 100644 --- a/src/kitemviews/private/kitemlistkeyboardsearchmanager.h +++ b/src/kitemviews/private/kitemlistkeyboardsearchmanager.h @@ -23,7 +23,7 @@ #ifndef KITEMLISTKEYBOARDSEARCHMANAGER_H #define KITEMLISTKEYBOARDSEARCHMANAGER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -35,7 +35,7 @@ * @see KItemListController * @see KItemModelBase */ -class LIBDOLPHINPRIVATE_EXPORT KItemListKeyboardSearchManager : public QObject +class DOLPHIN_EXPORT KItemListKeyboardSearchManager : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistroleeditor.h b/src/kitemviews/private/kitemlistroleeditor.h index 7c2b61e2d..3b8f96865 100644 --- a/src/kitemviews/private/kitemlistroleeditor.h +++ b/src/kitemviews/private/kitemlistroleeditor.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTROLEEDITOR_H #define KITEMLISTROLEEDITOR_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -33,7 +33,7 @@ * * The size automatically gets increased if the text does not fit. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListRoleEditor : public KTextEdit +class DOLPHIN_EXPORT KItemListRoleEditor : public KTextEdit { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistrubberband.h b/src/kitemviews/private/kitemlistrubberband.h index 39c7573ae..b47c30c1f 100644 --- a/src/kitemviews/private/kitemlistrubberband.h +++ b/src/kitemviews/private/kitemlistrubberband.h @@ -20,14 +20,14 @@ #ifndef KITEMLISTRUBBERBAND_H #define KITEMLISTRUBBERBAND_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include /** * @brief Manages the rubberband when selecting items. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListRubberBand : public QObject +class DOLPHIN_EXPORT KItemListRubberBand : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistselectiontoggle.h b/src/kitemviews/private/kitemlistselectiontoggle.h index bd64879af..d058ee988 100644 --- a/src/kitemviews/private/kitemlistselectiontoggle.h +++ b/src/kitemviews/private/kitemlistselectiontoggle.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSELECTIONTOGGLE_H #define KITEMLISTSELECTIONTOGGLE_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -29,7 +29,7 @@ /** * @brief Allows to toggle between the selected and unselected state of an item. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSelectionToggle : public QGraphicsWidget +class DOLPHIN_EXPORT KItemListSelectionToggle : public QGraphicsWidget { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistsizehintresolver.h b/src/kitemviews/private/kitemlistsizehintresolver.h index 3bd2319dd..ff17f2de2 100644 --- a/src/kitemviews/private/kitemlistsizehintresolver.h +++ b/src/kitemviews/private/kitemlistsizehintresolver.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSIZEHINTRESOLVER_H #define KITEMLISTSIZEHINTRESOLVER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -31,7 +31,7 @@ class KItemListView; /** * @brief Calculates and caches the sizehints of items in KItemListView. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSizeHintResolver +class DOLPHIN_EXPORT KItemListSizeHintResolver { public: KItemListSizeHintResolver(const KItemListView* itemListView); diff --git a/src/kitemviews/private/kitemlistsmoothscroller.h b/src/kitemviews/private/kitemlistsmoothscroller.h index 963cf7b24..fca4b0c53 100644 --- a/src/kitemviews/private/kitemlistsmoothscroller.h +++ b/src/kitemviews/private/kitemlistsmoothscroller.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTSMOOTHSCROLLER_H #define KITEMLISTSMOOTHSCROLLER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -33,7 +33,7 @@ class QWheelEvent; * @brief Helper class for KItemListContainer to have a smooth * scrolling when adjusting the scrollbars. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListSmoothScroller : public QObject +class DOLPHIN_EXPORT KItemListSmoothScroller : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistviewanimation.h b/src/kitemviews/private/kitemlistviewanimation.h index ed4ec4902..06c81c9b8 100644 --- a/src/kitemviews/private/kitemlistviewanimation.h +++ b/src/kitemviews/private/kitemlistviewanimation.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTVIEWANIMATION_H #define KITEMLISTVIEWANIMATION_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -36,7 +36,7 @@ class QPropertyAnimation; * Supports item animations for moving, creating, deleting and resizing * an item. Several applications can be applied to one item in parallel. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListViewAnimation : public QObject +class DOLPHIN_EXPORT KItemListViewAnimation : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kitemlistviewlayouter.h b/src/kitemviews/private/kitemlistviewlayouter.h index fc82d6061..3f1cf68d4 100644 --- a/src/kitemviews/private/kitemlistviewlayouter.h +++ b/src/kitemviews/private/kitemlistviewlayouter.h @@ -20,7 +20,7 @@ #ifndef KITEMLISTVIEWLAYOUTER_H #define KITEMLISTVIEWLAYOUTER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -45,7 +45,7 @@ class KItemListSizeHintResolver; * changing properties of the layouter is not expensive, only the * first read of a property can get expensive. */ -class LIBDOLPHINPRIVATE_EXPORT KItemListViewLayouter : public QObject +class DOLPHIN_EXPORT KItemListViewLayouter : public QObject { Q_OBJECT diff --git a/src/kitemviews/private/kpixmapmodifier.h b/src/kitemviews/private/kpixmapmodifier.h index b5eec6542..e8ca11ac1 100644 --- a/src/kitemviews/private/kpixmapmodifier.h +++ b/src/kitemviews/private/kpixmapmodifier.h @@ -20,12 +20,12 @@ #ifndef KPIXMAPMODIFIER_H #define KPIXMAPMODIFIER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" class QPixmap; class QSize; -class LIBDOLPHINPRIVATE_EXPORT KPixmapModifier +class DOLPHIN_EXPORT KPixmapModifier { public: static void scale(QPixmap& pixmap, const QSize& scaledSize); diff --git a/src/settings/viewpropertiesdialog.h b/src/settings/viewpropertiesdialog.h index 63c534b30..5490be85b 100644 --- a/src/settings/viewpropertiesdialog.h +++ b/src/settings/viewpropertiesdialog.h @@ -21,7 +21,7 @@ #ifndef VIEWPROPERTIESDIALOG_H #define VIEWPROPERTIESDIALOG_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include @@ -39,7 +39,7 @@ class DolphinView; * and previews should be shown. The properties can be assigned to the current folder, * or recursively to all sub folders. */ -class LIBDOLPHINPRIVATE_EXPORT ViewPropertiesDialog : public QDialog +class DOLPHIN_EXPORT ViewPropertiesDialog : public QDialog { Q_OBJECT diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 1c6c5b40c..22a8b4849 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -4,7 +4,7 @@ find_package(Qt5Test CONFIG REQUIRED) include(ECMMarkAsTest) # needed on windows to correctly use the files from dolphinprivate -add_definitions(-DLIBDOLPHINPRIVATE_EXPORT=) +add_definitions(-DDOLPHIN_EXPORT=) # KItemSetTest set(kitemsettest_SRCS diff --git a/src/views/dolphinfileitemlistwidget.cpp b/src/views/dolphinfileitemlistwidget.cpp index e8345435e..f15230841 100644 --- a/src/views/dolphinfileitemlistwidget.cpp +++ b/src/views/dolphinfileitemlistwidget.cpp @@ -21,7 +21,6 @@ #include #include -#include #include #include "dolphindebug.h" @@ -43,7 +42,7 @@ void DolphinFileItemListWidget::refreshCache() if (values.contains("version")) { // The item is under version control. Apply the text color corresponding // to its version state. - const KVersionControlPlugin2::ItemVersion version = static_cast(values.value("version").toInt()); + const KVersionControlPlugin::ItemVersion version = static_cast(values.value("version").toInt()); const QColor textColor = styleOption().palette.text().color(); QColor tintColor = textColor; @@ -51,16 +50,16 @@ void DolphinFileItemListWidget::refreshCache() // as tint colors and are mixed with the current set text color. The tint colors // have been optimized for the base colors of the corresponding Oxygen emblems. switch (version) { - case KVersionControlPlugin2::UpdateRequiredVersion: tintColor = Qt::yellow; break; - case KVersionControlPlugin2::LocallyModifiedUnstagedVersion: tintColor = Qt::green; break; - case KVersionControlPlugin2::LocallyModifiedVersion: tintColor = Qt::green; break; - case KVersionControlPlugin2::AddedVersion: tintColor = Qt::green; break; - case KVersionControlPlugin2::RemovedVersion: tintColor = Qt::darkRed; break; - case KVersionControlPlugin2::ConflictingVersion: tintColor = Qt::red; break; - case KVersionControlPlugin2::IgnoredVersion: tintColor = Qt::white; break; - case KVersionControlPlugin2::MissingVersion: tintColor = Qt::red; break; - case KVersionControlPlugin2::NormalVersion: - case KVersionControlPlugin2::UnversionedVersion: + case KVersionControlPlugin::UpdateRequiredVersion: tintColor = Qt::yellow; break; + case KVersionControlPlugin::LocallyModifiedUnstagedVersion: tintColor = Qt::green; break; + case KVersionControlPlugin::LocallyModifiedVersion: tintColor = Qt::green; break; + case KVersionControlPlugin::AddedVersion: tintColor = Qt::green; break; + case KVersionControlPlugin::RemovedVersion: tintColor = Qt::darkRed; break; + case KVersionControlPlugin::ConflictingVersion: tintColor = Qt::red; break; + case KVersionControlPlugin::IgnoredVersion: tintColor = Qt::white; break; + case KVersionControlPlugin::MissingVersion: tintColor = Qt::red; break; + case KVersionControlPlugin::NormalVersion: + case KVersionControlPlugin::UnversionedVersion: default: break; } @@ -78,7 +77,7 @@ void DolphinFileItemListWidget::refreshCache() setTextColor(color); } -QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin2::ItemVersion version, int size) +QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin::ItemVersion version, int size) { int overlayHeight = KIconLoader::SizeSmall; if (size >= KIconLoader::SizeEnormous) { @@ -115,8 +114,8 @@ QPixmap DolphinFileItemListWidget::overlayForState(KVersionControlPlugin2::ItemV iconName = "vcs-conflicting"; break; case KVersionControlPlugin::UnversionedVersion: - case KVersionControlPlugin2::IgnoredVersion: - case KVersionControlPlugin2::MissingVersion: + case KVersionControlPlugin::IgnoredVersion: + case KVersionControlPlugin::MissingVersion: break; default: Q_ASSERT(false); diff --git a/src/views/dolphinfileitemlistwidget.h b/src/views/dolphinfileitemlistwidget.h index 5f9cc3a5a..af73ac937 100644 --- a/src/views/dolphinfileitemlistwidget.h +++ b/src/views/dolphinfileitemlistwidget.h @@ -20,10 +20,10 @@ #ifndef DOLPHINFILEITEMLISTWIDGET_H #define DOLPHINFILEITEMLISTWIDGET_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include -#include +#include "versioncontrol/kversioncontrolplugin.h" /** * @brief Extends KFileItemListWidget to handle the "version" role. @@ -31,7 +31,7 @@ * The "version" role is set if version-control-plugins have been enabled. * @see KVersionControlPlugin */ -class LIBDOLPHINPRIVATE_EXPORT DolphinFileItemListWidget : public KFileItemListWidget +class DOLPHIN_EXPORT DolphinFileItemListWidget : public KFileItemListWidget { Q_OBJECT @@ -43,7 +43,7 @@ protected: virtual void refreshCache() Q_DECL_OVERRIDE; private: - static QPixmap overlayForState(KVersionControlPlugin2::ItemVersion version, int size); + static QPixmap overlayForState(KVersionControlPlugin::ItemVersion version, int size); }; diff --git a/src/views/dolphinitemlistview.h b/src/views/dolphinitemlistview.h index 2b16825f4..7eec6f17a 100644 --- a/src/views/dolphinitemlistview.h +++ b/src/views/dolphinitemlistview.h @@ -23,7 +23,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class KFileItemListView; @@ -34,7 +34,7 @@ class KFileItemListView; * the view-properties into the corresponding KItemListView * properties. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinItemListView : public KFileItemListView +class DOLPHIN_EXPORT DolphinItemListView : public KFileItemListView { Q_OBJECT diff --git a/src/views/dolphinnewfilemenuobserver.h b/src/views/dolphinnewfilemenuobserver.h index b9b18e229..df4621f17 100644 --- a/src/views/dolphinnewfilemenuobserver.h +++ b/src/views/dolphinnewfilemenuobserver.h @@ -22,7 +22,7 @@ #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class DolphinNewFileMenu; @@ -33,7 +33,7 @@ class DolphinNewFileMenu; * As soon as a DolphinNewFileMenu instance created a new item, * the observer will emit the signal itemCreated(). */ -class LIBDOLPHINPRIVATE_EXPORT DolphinNewFileMenuObserver : public QObject +class DOLPHIN_EXPORT DolphinNewFileMenuObserver : public QObject { Q_OBJECT diff --git a/src/views/dolphinremoteencoding.h b/src/views/dolphinremoteencoding.h index 0351abad7..28ff52cb3 100644 --- a/src/views/dolphinremoteencoding.h +++ b/src/views/dolphinremoteencoding.h @@ -23,7 +23,7 @@ #include #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class KActionMenu; @@ -35,7 +35,7 @@ class DolphinViewActionHandler; * When browsing remote url, its possible to change encoding from Tools Menu. */ -class LIBDOLPHINPRIVATE_EXPORT DolphinRemoteEncoding: public QObject +class DOLPHIN_EXPORT DolphinRemoteEncoding: public QObject { Q_OBJECT public: diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index aa4492bc3..24b560f10 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -23,7 +23,7 @@ #include -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -57,7 +57,7 @@ class QRegExp; * - show previews * - enable grouping */ -class LIBDOLPHINPRIVATE_EXPORT DolphinView : public QWidget +class DOLPHIN_EXPORT DolphinView : public QWidget { Q_OBJECT diff --git a/src/views/dolphinviewactionhandler.h b/src/views/dolphinviewactionhandler.h index bf664f731..eb375b5c9 100644 --- a/src/views/dolphinviewactionhandler.h +++ b/src/views/dolphinviewactionhandler.h @@ -22,7 +22,7 @@ #ifndef DOLPHINVIEWACTIONHANDLER_H #define DOLPHINVIEWACTIONHANDLER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include "views/dolphinview.h" #include @@ -46,7 +46,7 @@ class KActionCollection; * @see DolphinMainWindow * @see DolphinPart */ -class LIBDOLPHINPRIVATE_EXPORT DolphinViewActionHandler : public QObject +class DOLPHIN_EXPORT DolphinViewActionHandler : public QObject { Q_OBJECT diff --git a/src/views/draganddrophelper.h b/src/views/draganddrophelper.h index 0fbe3a128..fe77b1e6e 100644 --- a/src/views/draganddrophelper.h +++ b/src/views/draganddrophelper.h @@ -21,7 +21,7 @@ #ifndef DRAGANDDROPHELPER_H #define DRAGANDDROPHELPER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" class QUrl; @@ -29,7 +29,7 @@ class QDropEvent; class QWidget; namespace KIO { class DropJob; } -class LIBDOLPHINPRIVATE_EXPORT DragAndDropHelper +class DOLPHIN_EXPORT DragAndDropHelper { public: /** diff --git a/src/views/renamedialog.h b/src/views/renamedialog.h index 7c02d1b87..a1953e8b3 100644 --- a/src/views/renamedialog.h +++ b/src/views/renamedialog.h @@ -20,7 +20,7 @@ #ifndef RENAMEDIALOG_H #define RENAMEDIALOG_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include @@ -33,7 +33,7 @@ class QPushButton; /** * @brief Dialog for renaming a variable number of files. */ -class LIBDOLPHINPRIVATE_EXPORT RenameDialog : public QDialog +class DOLPHIN_EXPORT RenameDialog : public QDialog { Q_OBJECT diff --git a/src/views/versioncontrol/kversioncontrolplugin.cpp b/src/views/versioncontrol/kversioncontrolplugin.cpp new file mode 100644 index 000000000..2c0632878 --- /dev/null +++ b/src/views/versioncontrol/kversioncontrolplugin.cpp @@ -0,0 +1,29 @@ +/***************************************************************************** + * Copyright (C) 2011 by Vishesh Yadav * + * Copyright (C) 2011 by Peter Penz * + * * + * 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. * + *****************************************************************************/ + +#include "kversioncontrolplugin.h" + +KVersionControlPlugin::KVersionControlPlugin(QObject* parent) : + QObject(parent) +{ +} + +KVersionControlPlugin::~KVersionControlPlugin() +{ +} diff --git a/src/views/versioncontrol/kversioncontrolplugin.h b/src/views/versioncontrol/kversioncontrolplugin.h new file mode 100644 index 000000000..e5a267848 --- /dev/null +++ b/src/views/versioncontrol/kversioncontrolplugin.h @@ -0,0 +1,223 @@ +/***************************************************************************** + * Copyright (C) 2011 by Vishesh Yadav * + * Copyright (C) 2011 by Peter Penz * + * * + * 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 KVERSIONCONTROLPLUGIN_H +#define KVERSIONCONTROLPLUGIN_H + +#include + +#include +#include +#include + +/** + * @brief Base class for version control plugins. + * + * Enables the file manager to show the version state + * of a versioned file. To write a custom plugin, the following + * steps are required (in the example below it is assumed that a plugin for + * Subversion will be written): + * + * - Create a fileviewsvnplugin.desktop file with the following content: + * + * [Desktop Entry] + * Type=Service + * Name=Subversion + * X-KDE-ServiceTypes=FileViewVersionControlPlugin + * MimeType=text/plain; + * X-KDE-Library=fileviewsvnplugin + * + * + * - Create a class FileViewSvnPlugin derived from KVersionControlPlugin and + * implement all abstract interfaces (fileviewsvnplugin.h, fileviewsvnplugin.cpp). + * + * - Take care that the constructor has the following signature: + * + * FileViewSvnPlugin(QObject* parent, const QList& args); + * + * + * - Add the following lines at the top of fileviewsvnplugin.cpp: + * + * #include + * #include + * K_PLUGIN_FACTORY(FileViewSvnPluginFactory, registerPlugin();) + * K_EXPORT_PLUGIN(FileViewSvnPluginFactory("fileviewsvnplugin")) + * + * + * - Add the following lines to your CMakeLists.txt file: + * + * kde4_add_plugin(fileviewsvnplugin fileviewsvnplugin.cpp) + * target_link_libraries(fileviewsvnplugin konq) + * install(FILES fileviewsvnplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR}) + * + * + * General implementation notes: + * + * - The implementations of beginRetrieval(), endRetrieval() and versionState() + * can contain blocking operations, as Dolphin will execute + * those methods in a separate thread. It is assured that + * all other methods are invoked in a serialized way, so that it is not necessary for + * the plugin to use any mutex. + * + * - Dolphin keeps only one instance of the plugin, which is instantiated shortly after + * starting Dolphin. Take care that the constructor does no expensive and time + * consuming operations. + * + * @since 4.8 + */ +class DOLPHIN_EXPORT KVersionControlPlugin : public QObject +{ + Q_OBJECT + +public: + enum ItemVersion + { + /** The file is not under version control. */ + UnversionedVersion, + /** + * The file is under version control and represents + * the latest version. + */ + NormalVersion, + /** + * The file is under version control and a newer + * version exists on the main branch. + */ + UpdateRequiredVersion, + /** + * The file is under version control and has been + * modified locally. All modifications will be part + * of the next commit. + */ + LocallyModifiedVersion, + /** + * The file has not been under version control but + * has been marked to get added with the next commit. + */ + AddedVersion, + /** + * The file is under version control but has been marked + * for getting removed with the next commit. + */ + RemovedVersion, + /** + * The file is under version control and has been locally + * modified. A modification has also been done on the main + * branch. + */ + ConflictingVersion, + /** + * The file is under version control and has local + * modifications, which will not be part of the next + * commit (or are "unstaged" in git jargon). + * @since 4.6 + */ + LocallyModifiedUnstagedVersion, + /** + * The file is not under version control and is listed + * in the ignore list of the version control system. + * @since 4.8 + */ + IgnoredVersion, + /** + * The file is is tracked by the version control system, but + * is missing in the directory (e.g. by deleted without using + * a version control command). + * @since 4.8 + */ + MissingVersion + }; + + KVersionControlPlugin(QObject* parent = 0); + virtual ~KVersionControlPlugin(); + + /** + * Returns the name of the file which stores + * the version controls information. + * (e. g. .svn, .cvs, .git). + */ + virtual QString fileName() const = 0; + + /** + * Is invoked whenever the version control + * information will get retrieved for the directory + * \p directory. It is assured that the directory + * contains a trailing slash. + */ + virtual bool beginRetrieval(const QString& directory) = 0; + + /** + * Is invoked after the version control information has been + * received. It is assured that + * KVersionControlPluginV2::beginInfoRetrieval() has been + * invoked before. + */ + virtual void endRetrieval() = 0; + + /** + * @return The version for the item \p item. + * It is assured that KVersionControlPlugin::beginInfoRetrieval() has been + * invoked before and that the file is part of the directory specified + * in beginInfoRetrieval(). + */ + virtual ItemVersion itemVersion(const KFileItem& item) const = 0; + + /** + * @return List of actions that are available for the items \p items. + * It is recommended to keep the number of returned actions small + * in case if an item is an unversioned directory that is not + * inside the hierarchy tree of the version control system. This + * prevents having a cluttered context menu for directories + * outside the version control system. + */ + virtual QList actions(const KFileItemList& items) const = 0; + +Q_SIGNALS: + /** + * Should be emitted when the version state of items might have been changed + * after the last retrieval (e. g. by executing a context menu action + * of the version control plugin). The file manager will be triggered to + * update the version states of the directory \p directory by invoking + * KVersionControlPlugin::beginRetrieval(), + * KVersionControlPlugin::itemVersion() and + * KVersionControlPlugin::endRetrieval(). + */ + void itemVersionsChanged(); + + /** + * Is emitted if an information message with the content \a msg + * should be shown. + */ + void infoMessage(const QString& msg); + + /** + * Is emitted if an error message with the content \a msg + * should be shown. + */ + void errorMessage(const QString& msg); + + /** + * Is emitted if an "operation completed" message with the content \a msg + * should be shown. + */ + void operationCompletedMessage(const QString& msg); +}; + +#endif // KVERSIONCONTROLPLUGIN_H + diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index 4f0122e0f..e4413fabf 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -19,9 +19,7 @@ #include "updateitemstatesthread.h" -#include #include - #include UpdateItemStatesThread::UpdateItemStatesThread(KVersionControlPlugin* plugin, @@ -53,20 +51,10 @@ void UpdateItemStatesThread::run() if (m_plugin->beginRetrieval(it.key())) { QVector& items = it.value(); const int count = items.count(); - - KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); - if (pluginV2) { - for (int i = 0; i < count; ++i) { - const KFileItem& item = items.at(i).first; - const KVersionControlPlugin2::ItemVersion version = pluginV2->itemVersion(item); - items[i].second = version; - } - } else { - for (int i = 0; i < count; ++i) { - const KFileItem& item = items.at(i).first; - const KVersionControlPlugin::VersionState state = m_plugin->versionState(item); - items[i].second = static_cast(state); - } + for (int i = 0; i < count; ++i) { + const KFileItem& item = items.at(i).first; + const KVersionControlPlugin::ItemVersion version = m_plugin->itemVersion(item); + items[i].second = version; } } diff --git a/src/views/versioncontrol/updateitemstatesthread.h b/src/views/versioncontrol/updateitemstatesthread.h index 92a9d59c9..3dc03fc75 100644 --- a/src/views/versioncontrol/updateitemstatesthread.h +++ b/src/views/versioncontrol/updateitemstatesthread.h @@ -20,20 +20,18 @@ #ifndef UPDATEITEMSTATESTHREAD_H #define UPDATEITEMSTATESTHREAD_H -#include "libdolphin_export.h" +#include "dolphin_export.h" #include #include #include -class KVersionControlPlugin; - /** * The performance of updating the version state of items depends * on the used plugin. To prevent that Dolphin gets blocked by a * slow plugin, the updating is delegated to a thread. */ -class LIBDOLPHINPRIVATE_EXPORT UpdateItemStatesThread : public QThread +class DOLPHIN_EXPORT UpdateItemStatesThread : public QThread { Q_OBJECT diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 47e3da357..13481cc7a 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -26,7 +26,6 @@ #include "dolphindebug.h" #include #include -#include #include "updateitemstatesthread.h" @@ -89,8 +88,6 @@ KFileItemModel* VersionControlObserver::model() const QList VersionControlObserver::actions(const KFileItemList& items) const { - QList actions; - bool hasNullItems = false; foreach (const KFileItem& item, items) { if (item.isNull()) { @@ -101,30 +98,10 @@ QList VersionControlObserver::actions(const KFileItemList& items) cons } if (!m_model || hasNullItems) { - return actions; - } - - KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); - if (pluginV2) { - // Use version 2 of the KVersionControlPlugin which allows providing actions - // also for non-versioned directories. - actions = pluginV2->actions(items); - } else if (isVersioned()) { - // Support deprecated interfaces from KVersionControlPlugin version 1. - // Context menu actions where only available for versioned directories. - QString directory; - if (items.count() == 1) { - const KFileItem rootItem = m_model->rootItem(); - if (!rootItem.isNull() && items.first().url() == rootItem.url()) { - directory = rootItem.url().path(); - } - } - - actions = directory.isEmpty() ? m_plugin->contextMenuActions(items) - : m_plugin->contextMenuActions(directory); + return {}; } - return actions; + return m_plugin->actions(items); } void VersionControlObserver::delayedDirectoryVerification() @@ -156,14 +133,8 @@ void VersionControlObserver::verifyDirectory() m_plugin = searchPlugin(rootItem.url()); if (m_plugin) { - KVersionControlPlugin2* pluginV2 = qobject_cast(m_plugin); - if (pluginV2) { - connect(pluginV2, &KVersionControlPlugin2::itemVersionsChanged, - this, &VersionControlObserver::silentDirectoryVerification); - } else { - connect(m_plugin, &KVersionControlPlugin::versionStatesChanged, - this, &VersionControlObserver::silentDirectoryVerification); - } + connect(m_plugin, &KVersionControlPlugin::itemVersionsChanged, + this, &VersionControlObserver::silentDirectoryVerification); connect(m_plugin, &KVersionControlPlugin::infoMessage, this, &VersionControlObserver::infoMessage); connect(m_plugin, &KVersionControlPlugin::errorMessage, @@ -205,7 +176,7 @@ void VersionControlObserver::slotThreadFinished() foreach (const ItemState& item, items) { const KFileItem& fileItem = item.first; - const KVersionControlPlugin2::ItemVersion version = item.second; + const KVersionControlPlugin::ItemVersion version = item.second; QHash values; values.insert("version", QVariant(version)); m_model->setData(m_model->index(fileItem), values); @@ -268,7 +239,7 @@ int VersionControlObserver::createItemStatesList(QMapfileItem(index); - itemState.second = KVersionControlPlugin2::UnversionedVersion; + itemState.second = KVersionControlPlugin::UnversionedVersion; items.append(itemState); } else if (expansionLevel > currentExpansionLevel) { diff --git a/src/views/versioncontrol/versioncontrolobserver.h b/src/views/versioncontrol/versioncontrolobserver.h index a43dc3415..c817c2187 100644 --- a/src/views/versioncontrol/versioncontrolobserver.h +++ b/src/views/versioncontrol/versioncontrolobserver.h @@ -20,11 +20,13 @@ #ifndef VERSIONCONTROLOBSERVER_H #define VERSIONCONTROLOBSERVER_H -#include "libdolphin_export.h" +#include "dolphin_export.h" + +#include "kversioncontrolplugin.h" #include + #include -#include #include #include #include @@ -43,7 +45,7 @@ class UpdateItemStatesThread; * * @see VersionControlPlugin */ -class LIBDOLPHINPRIVATE_EXPORT VersionControlObserver : public QObject +class DOLPHIN_EXPORT VersionControlObserver : public QObject { Q_OBJECT @@ -100,7 +102,7 @@ private slots: void slotThreadFinished(); private: - typedef QPair ItemState; + typedef QPair ItemState; void updateItemStates(); diff --git a/src/views/viewmodecontroller.h b/src/views/viewmodecontroller.h index 89f1020b5..4b1ff2083 100644 --- a/src/views/viewmodecontroller.h +++ b/src/views/viewmodecontroller.h @@ -22,7 +22,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" #include /** @@ -33,7 +33,7 @@ * connect to signals of the ViewModeController to react on changes. The view * implementations get only read-access to the ViewModeController. */ -class LIBDOLPHINPRIVATE_EXPORT ViewModeController : public QObject +class DOLPHIN_EXPORT ViewModeController : public QObject { Q_OBJECT diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h index b9c2fa546..dc118e2d7 100644 --- a/src/views/viewproperties.h +++ b/src/views/viewproperties.h @@ -23,7 +23,7 @@ #include #include -#include "libdolphin_export.h" +#include "dolphin_export.h" class ViewPropertySettings; /** @@ -47,7 +47,7 @@ class ViewPropertySettings; * (see GeneralSettings::globalViewMode()), the values from the global .directory file * are used for initialization. */ -class LIBDOLPHINPRIVATE_EXPORT ViewProperties +class DOLPHIN_EXPORT ViewProperties { public: explicit ViewProperties(const QUrl& url); -- cgit v1.3