Commit 142d750e authored by Kevin Funk's avatar Kevin Funk
Browse files

Less use of KDELibs4Support in libraries/plugins

parent df15290c
......@@ -28,6 +28,7 @@ include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)
include(ECMGenerateHeaders)
include(ECMPackageConfigHelpers)
include(GenerateExportHeader)
include(FeatureSummary)
include(WriteBasicConfigVersionFile)
include(CheckFunctionExists)
......
......@@ -29,6 +29,7 @@ target_link_libraries(KDevPlatformDebugger LINK_PUBLIC
KDev::Util
LINK_PRIVATE
Qt5::Core
KF5::Notifications
KF5::TextEditor
KDev::Sublime
)
......
......@@ -35,7 +35,6 @@
#include "../breakpoint/breakpoint.h"
#include "../../interfaces/iuicontroller.h"
#include "util/debug.h"
#include <KComponentData>
namespace KDevelop {
......@@ -194,7 +193,8 @@ void IBreakpointController::hit(KDevelop::Breakpoint* breakpoint, const QString
}
if (ev) {
ev->setPixmap(QIcon::fromTheme("script-error").pixmap(QSize(22,22)));
ev->setComponentName(ICore::self()->aboutData().componentName());
// TODO: Port
//ev->setComponentName(ICore::self()->aboutData().componentName());
ev->sendEvent();
}
}
......
......@@ -15,6 +15,7 @@
#include "variablewidget.h"
#include <QApplication>
#include <QLabel>
#include <QLayout>
#include <QPainter>
......@@ -29,12 +30,9 @@
#include <QPoint>
#include <QClipboard>
#include <kapplication.h>
#include <kmessagebox.h>
#include <khistorycombobox.h>
#include <QLineEdit>
#include <kdeversion.h>
#include <kiconloader.h>
#include <KLocalizedString>
#include "../../interfaces/icore.h"
......
......@@ -46,6 +46,7 @@ add_library(KDev::Interfaces ALIAS KDevPlatformInterfaces)
generate_export_header(KDevPlatformInterfaces EXPORT_FILE_NAME interfacesexport.h)
target_link_libraries(KDevPlatformInterfaces
LINK_PUBLIC
KF5::ConfigCore
KF5::Parts
KF5::TextEditor
KF5::I18n
......
......@@ -129,7 +129,7 @@ public:
virtual Path projectFile() const = 0;
/** Get the url of the project file.*/
KDEVPLATFORMINTERFACES_DEPRECATED Q_SCRIPTABLE virtual QUrl projectFileUrl() const = 0;
virtual KSharedConfig::Ptr projectConfiguration() const = 0;
virtual KSharedConfigPtr projectConfiguration() const = 0;
virtual void addToFileSet( ProjectFileItem* item ) = 0;
virtual void removeFromFileSet( ProjectFileItem* item ) = 0;
......
......@@ -54,7 +54,7 @@ public:
virtual QList<QUrl> containedProjects() const = 0;
virtual void setContainedProjects( const QList<QUrl>& projects ) = 0;
virtual QUrl pluginDataArea( const IPlugin* ) = 0;
virtual KSharedConfig::Ptr config() = 0;
virtual KSharedConfigPtr config() = 0;
virtual QUuid id() const = 0;
/**
......
......@@ -5,7 +5,7 @@ add_executable(test_foregroundlock ${foregroundlock_SRC})
target_include_directories(test_foregroundlock PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..) # for export header
add_test(test_foregroundlock test_foregroundlock)
ecm_mark_as_test(test_foregroundlock)
target_link_libraries(test_foregroundlock Qt5::Test KF5::KDELibs4Support)
target_link_libraries(test_foregroundlock Qt5::Test)
if( RT_LIBRARY )
target_link_libraries( test_foregroundlock ${RT_LIBRARY} )
......
......@@ -166,11 +166,10 @@ target_link_libraries(KDevPlatformLanguage LINK_PUBLIC
KDev::Interfaces
KDev::Serialization
LINK_PRIVATE
KF5::GuiAddons
KF5::TextEditor
KF5::Parts
KF5::NewStuff
KF5::Archive
KF5::KDELibs4Support
KDev::Util
KDev::Project
)
......
......@@ -24,7 +24,6 @@
#include <KArchive>
#include <KZip>
#include <KComponentData>
#include <KTar>
#include <QFileInfo>
......
......@@ -24,7 +24,6 @@
#include <interfaces/icore.h>
#include <KComponentData>
#include <KArchive>
#include <KZip>
#include <KTar>
......
......@@ -37,8 +37,6 @@
#include <project/interfaces/ibuildsystemmanager.h>
#include <project/projectmodel.h>
#include <KComponentData>
#include <QFileInfo>
using namespace KDevelop;
......
......@@ -22,9 +22,9 @@
#include "util/debug.h"
#include <interfaces/icore.h>
#include <KConfig>
#include <KTar>
#include <KZip>
#include <KComponentData>
#include <KConfigGroup>
#include <KLocalizedString>
......
......@@ -23,9 +23,9 @@
#include <QtCore/QMetaObject>
#include <QScrollBar>
#include <QBoxLayout>
#include <QTextBrowser>
#include <KLocalizedString>
#include <ktextbrowser.h>
#include "../declaration.h"
#include "../ducontext.h"
......
......@@ -23,8 +23,6 @@
#include "configurablecolors.h"
#include <KColorScheme>
#include <KColorUtils>
#include <KGlobalSettings>
#include "../../interfaces/icore.h"
#include "../../interfaces/ilanguagecontroller.h"
......@@ -37,6 +35,7 @@
#include "../duchain/duchainlock.h"
#include "util/debug.h"
#include <KColorUtils>
#include <KTextEditor/Document>
#include <KTextEditor/View>
#include <KTextEditor/ConfigInterface>
......
......@@ -27,7 +27,6 @@
#include <language/duchain/duchain.h>
#include <language/codegen/coderepresentation.h>
#include <language/highlighting/codehighlighting.h>
#include <KColorUtils>
QTEST_MAIN(TestHighlighting)
......
......@@ -23,6 +23,7 @@ target_link_libraries(kdevappwizard
KF5::KIOWidgets
KF5::NewStuff
KF5::Archive
KF5::KDELibs4Support
KDev::Interfaces KDev::Vcs KDev::Language KDev::Util)
install(TARGETS kdevappwizard DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION} )
......
......@@ -343,7 +343,7 @@ QString AppWizardPlugin::createProject(const ApplicationInfo& info)
if( ! QFileInfo( projectFileName ).exists() )
{
qCDebug(PLUGIN_APPWIZARD) << "creating .kdev4 file";
KSharedConfig::Ptr cfg = KSharedConfig::openConfig( projectFileName, KConfig::SimpleConfig );
KSharedConfigPtr cfg = KSharedConfig::openConfig( projectFileName, KConfig::SimpleConfig );
KConfigGroup project = cfg->group( "Project" );
project.writeEntry( "Name", info.name );
QString manager = "KDevGenericManager";
......
......@@ -29,7 +29,6 @@
#include <QHeaderView>
#include <KLocalizedString>
#include <KIconLoader>
#include <QLineEdit>
#include "classmodel.h"
......
......@@ -36,6 +36,7 @@ add_library(kdevcvs MODULE ${kdevcvs_PART_SRCS})
target_link_libraries(kdevcvs
KF5::KIOWidgets
KF5::Parts
KF5::KDELibs4Support
KDev::Util
KDev::Interfaces
KDev::Vcs
......
......@@ -13,12 +13,9 @@ set(kdevdocumentview_PART_SRCS
add_library(kdevdocumentview MODULE ${kdevdocumentview_PART_SRCS})
# FIXME: needs to be added for utilexport.h (needed because iproject MUST include util/path.h or moc breaks)
target_include_directories(kdevdocumentview PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../../util)
target_link_libraries(kdevdocumentview
KDev::Interfaces
KF5::TextEditor
KF5::KDELibs4Support
)
install(TARGETS kdevdocumentview DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION} )
......
......@@ -31,7 +31,6 @@ Boston, MA 02110-1301, USA.
#include <QAction>
#include <KLocalizedString>
#include <kurl.h>
#include <kiconloader.h>
#include <kstandardaction.h>
#include <klocalizedstring.h>
......
......@@ -28,8 +28,7 @@
#include <QAction>
#include <KLocalizedString>
#include <kaboutdata.h>
#include <kgenericfactory.h>
#include <KPluginFactory>
#include <interfaces/icore.h>
#include <interfaces/iuicontroller.h>
......
......@@ -21,7 +21,6 @@ set(kdevexecutescript_PART_SRCS
qt5_wrap_ui( kdevexecutescript_PART_SRCS ${kdevexecutescript_PART_UIS} )
add_library(kdevexecutescript MODULE ${kdevexecutescript_PART_SRCS})
target_link_libraries(kdevexecutescript
KF5::KDELibs4Support
KDev::Interfaces
KDev::Util
KDev::Project
......
......@@ -8,7 +8,7 @@ set(kdevfilemanager_PART_SRCS
)
add_library(kdevfilemanager MODULE ${kdevfilemanager_PART_SRCS})
target_link_libraries(kdevfilemanager KF5::KIOWidgets KF5::TextEditor KF5::TextEditor KDev::Interfaces KF5::KDELibs4Support)
target_link_libraries(kdevfilemanager KF5::KIOCore KF5::KIOWidgets KF5::TextEditor KF5::Solid KF5::KDELibs4Support KDev::Interfaces)
install(TARGETS kdevfilemanager DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION} )
......
......@@ -23,7 +23,6 @@
#include <KLocalizedString>
#include <KEMailSettings>
#include <KComponentData>
#include <KMessageBox>
#include <KConfigGroup>
......
......@@ -27,7 +27,6 @@
#include <KI18n/KLocalizedString>
#include <KUrlRequester>
#include <KFileDialog>
#include <QSpinBox>
#include <QSignalMapper>
......
......@@ -37,11 +37,9 @@
#include "ui_templateselection.h"
#include <KNS3/DownloadDialog>
#include <KNS3/KNewStuffButton>
#include <kns3/button.h>
#include <KLocalizedString>
#include <KComponentData>
#include <KFileDialog>
#include <QFileDialog>
#include <KConfigGroup>
#include <QTemporaryDir>
#include <KTextEditor/Document>
......@@ -146,7 +144,7 @@ void TemplateSelectionPagePrivate::getMoreClicked()
void TemplateSelectionPagePrivate::loadFileClicked()
{
QString filter = "application/x-desktop application/x-bzip-compressed-tar application/zip";
QString fileName = KFileDialog::getOpenFileName(QUrl("kfiledialog:///kdevclasstemplate"), filter, page);
QString fileName = QFileDialog::getOpenFileName(page, QString(), QString(), filter);
if (!fileName.isEmpty())
{
......@@ -162,7 +160,7 @@ void TemplateSelectionPagePrivate::loadFileClicked()
void TemplateSelectionPage::saveConfig()
{
KSharedConfig::Ptr config;
KSharedConfigPtr config;
if (IProject* project = ICore::self()->projectController()->findProjectForUrl(d->assistant->baseUrl()))
{
config = project->projectConfiguration();
......@@ -203,7 +201,7 @@ TemplateSelectionPage::TemplateSelectionPage(TemplateClassAssistant* parent, Qt:
templateIndex = templateIndex.child(0, 0);
}
KSharedConfig::Ptr config;
KSharedConfigPtr config;
if (IProject* project = ICore::self()->projectController()->findProjectForUrl(d->assistant->baseUrl()))
{
config = project->projectConfiguration();
......
......@@ -46,8 +46,6 @@
#include <vcs/dvcs/dvcsjob.h>
#include <vcs/vcsannotation.h>
#include <vcs/widgets/standardvcslocationwidget.h>
#include <KIO/CopyJob>
#include <KIO/NetAccess>
#include "gitclonejob.h"
#include <interfaces/contextmenuextension.h>
#include <QMenu>
......@@ -57,6 +55,7 @@
#include <KTextEdit>
#include <KDirWatch>
#include <KTextEditor/Document>
#include <kio/copyjob.h>
#include "gitjob.h"
#include "gitmessagehighlighter.h"
#include "gitplugincheckinrepositoryjob.h"
......@@ -491,14 +490,17 @@ VcsJob* GitPlugin::remove(const QList<QUrl>& files)
//if it's an unversioned file we are done, don't use git rm on it
i.remove();
}
KIO::NetAccess::synchronousRun(KIO::trash(otherFiles), 0);
auto trashJob = KIO::trash(otherFiles);
trashJob->exec();
qCDebug(PLUGIN_GIT) << "other files" << otherFiles;
}
if (fileInfo.isDir()) {
if (isEmptyDirStructure(QDir(file.toLocalFile()))) {
//remove empty folders, git doesn't do that
KIO::NetAccess::synchronousRun(KIO::trash(file), 0);
auto trashJob = KIO::trash(file);
trashJob->exec();
qCDebug(PLUGIN_GIT) << "empty folder, removing" << file;
//we already deleted it, don't use git rm on it
i.remove();
......
......@@ -26,6 +26,7 @@ target_link_libraries(kdevgrepview
KF5::TextEditor
KF5::Completion
KF5::TextEditor
KF5::KDELibs4Support
KDev::Interfaces
KDev::OutputView
KDev::Project
......
......@@ -17,5 +17,5 @@ set(kdevgrepview_PART_UI
qt5_wrap_ui(findReplaceTest_SRCS ${kdevgrepview_PART_UI})
ecm_add_test(${findReplaceTest_SRCS}
TEST_NAME test_findreplace
LINK_LIBRARIES Qt5::Test KDev::Language KDev::Project KDev::Util KDev::Tests
LINK_LIBRARIES Qt5::Test KF5::KDELibs4Support KDev::Language KDev::Project KDev::Util KDev::Tests
GUI)
......@@ -7,7 +7,7 @@ set(kdevkonsoleview_PART_SRCS
)
add_library(kdevkonsoleview MODULE ${kdevkonsoleview_PART_SRCS})
target_link_libraries(kdevkonsoleview KF5::Parts KF5::KDELibs4Support KDev::Interfaces)
target_link_libraries(kdevkonsoleview KF5::Parts KDev::Interfaces)
install(TARGETS kdevkonsoleview DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION} )
......
......@@ -15,7 +15,7 @@ qt5_wrap_ui(patchreview_PART_SRCS patchreview.ui localpatchwidget.ui)
add_library(kdevpatchreview MODULE ${patchreview_PART_SRCS})
target_link_libraries(kdevpatchreview KF5::TextEditor KF5::Parts KDev::Interfaces KDev::Util KDev::Language KDev::Vcs KDev::Sublime ${LIBKOMPAREDIFF2_LIBRARIES})
target_link_libraries(kdevpatchreview KF5::IconThemes KF5::TextEditor KF5::Parts KF5::KDELibs4Support KDev::Interfaces KDev::Util KDev::Language KDev::Vcs KDev::Sublime ${LIBKOMPAREDIFF2_LIBRARIES})
install(TARGETS kdevpatchreview DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION})
......
......@@ -19,7 +19,8 @@
*/
#include "standardpatchexport.h"
#include <KFileDialog>
#include <QFileDialog>
#include <KIO/CopyJob>
#include <KLocalizedString>
#include <KToolInvocation>
......@@ -43,7 +44,7 @@ public:
class KIOExport : public StandardExporter
{
virtual void exportPatch( KDevelop::IPatchSource::Ptr source ) {
QUrl dest = KFileDialog::getSaveUrl();
QUrl dest = QFileDialog::getSaveFileUrl();
if( !dest.isEmpty() ) { //We let KDE do the rest of the job including the notification
KIO::CopyJob* job = KIO::copy( source->file(), dest );
KIO::getJobTracker()->registerJob( job );
......
......@@ -11,7 +11,7 @@ set( projectfilter_SRCS
add_library( kdevprojectfilter MODULE ${projectfilter_SRCS} )
target_link_libraries( kdevprojectfilter
KF5::KCMUtils KF5::KDELibs4Support
KF5::KCMUtils
KDev::Project KDev::Util KDev::Interfaces )
install( TARGETS kdevprojectfilter DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION} )
......@@ -39,7 +39,7 @@ qt5_wrap_ui( projectfilterkcm_SRCS ${projectfilterkcm_UI} )
kconfig_add_kcfg_files( projectfilterkcm_SRCS projectfiltersettings.kcfgc )
add_library( kcm_kdevprojectfilter MODULE ${projectfilterkcm_SRCS} )
target_link_libraries( kcm_kdevprojectfilter
KF5::KCMUtils KF5::KDELibs4Support
KF5::KCMUtils
KDev::Project KDev::Util KDev::Interfaces)
install( TARGETS kcm_kdevprojectfilter DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION}/kcm )
......
......@@ -99,7 +99,7 @@ SerializedFilters defaultFilters()
return ret;
}
SerializedFilters readFilters(const KSharedConfig::Ptr& config)
SerializedFilters readFilters(const KSharedConfigPtr& config)
{
if (!config->hasGroup("Filters")) {
return defaultFilters();
......@@ -128,7 +128,7 @@ SerializedFilters readFilters(const KSharedConfig::Ptr& config)
return filters;
}
void writeFilters(const SerializedFilters& filters, KSharedConfig::Ptr config)
void writeFilters(const SerializedFilters& filters, KSharedConfigPtr config)
{
// clear existing
config->deleteGroup("Filters");
......
......@@ -84,8 +84,8 @@ struct SerializedFilter
typedef QVector<SerializedFilter> SerializedFilters;
SerializedFilters defaultFilters();
SerializedFilters readFilters(const KSharedConfig::Ptr& config);
void writeFilters(const SerializedFilters& filters, KSharedConfig::Ptr config);
SerializedFilters readFilters(const KSharedConfigPtr& config);
void writeFilters(const SerializedFilters& filters, KSharedConfigPtr config);
Filters deserialize(const SerializedFilters& filters);
}
......
......@@ -22,11 +22,11 @@
#include <QStandardItemModel>
#include <QKeyEvent>
#include <kgenericfactory.h>
#include <KConfigDialogManager>
#include <KSettings/Dispatcher>
#include <ksettings/dispatcher.h>
#include <KCoreAddons/KAboutData>
#include <KMessageWidget>
#include <KLocalizedString>
#include <interfaces/icore.h>
#include <interfaces/iplugincontroller.h>
......
......@@ -24,7 +24,7 @@
#include <KPluginLoader>
#include <KPluginFactory>
#include <KAboutData>
#include <KSettings/Dispatcher>
#include <ksettings/dispatcher.h>
#include <KMessageBox>
#include <KParts/MainWindow>
#include <KLocalizedString>
......
......@@ -14,8 +14,11 @@ set(kdevprojectmanagerview_PLUGIN_SRCS
qt5_wrap_ui( kdevprojectmanagerview_PLUGIN_SRCS projectbuildsetwidget.ui projectmanagerview.ui )
add_library(kdevprojectmanagerview MODULE ${kdevprojectmanagerview_PLUGIN_SRCS})
target_link_libraries(kdevprojectmanagerview KF5::TextEditor
KDev::Interfaces KDev::Project KDev::Language KDev::Util KDev::Vcs KDev::Sublime KF5::ThreadWeaver)
target_link_libraries(kdevprojectmanagerview
KF5::TextEditor
KF5::ThreadWeaver
KF5::KDELibs4Support
KDev::Interfaces KDev::Project KDev::Language KDev::Util KDev::Vcs KDev::Sublime )
install(TARGETS kdevprojectmanagerview DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION} )
......
......@@ -25,7 +25,6 @@
#include <QKeyEvent>
#include <QUrl>
#include <kiconloader.h>
#include <KLocalizedString>
#include <kactioncollection.h>
#include <QLineEdit>
......
......@@ -23,7 +23,7 @@ set (
qt5_wrap_ui(kdevquickopen_PART_SRCS ${kdevquickopen_UI})
add_library(kdevquickopen MODULE ${kdevquickopen_PART_SRCS})
target_link_libraries(kdevquickopen KDev::Language KDev::Interfaces KDev::Project KF5::TextEditor KDev::Util)
target_link_libraries(kdevquickopen KF5::IconThemes KF5::GuiAddons KF5::TextEditor KDev::Language KDev::Interfaces KDev::Project KDev::Util)
install(TARGETS kdevquickopen DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION})
......
......@@ -25,9 +25,9 @@
#include <QBrush>
#include <ktexteditor/codecompletionmodel.h>
#include <kiconloader.h>
#include <ktextedit.h>
#include "kcolorutils.h"
#include <kiconloader.h>
#include <kcolorutils.h>
#include "expandingdelegate.h"
#include <qapplication.h>
......
......@@ -44,7 +44,6 @@
#include <KConfigCore/KConfigGroup>
#include <kactioncollection.h>
#include <QAction>
#include <kshortcut.h>
#include <interfaces/ilanguage.h>
#include <interfaces/icore.h>
......
......@@ -3,8 +3,7 @@ add_library(quickopentestbase STATIC
../projectfilequickopen.cpp)
target_link_libraries(quickopentestbase PUBLIC
Qt5::Test KDev::Tests KDev::Project KDev::Language)
Qt5::Test KF5::IconThemes KF5::KDELibs4Support KDev::Tests KDev::Project KDev::Language)
ecm_add_test(test_quickopen.cpp LINK_LIBRARIES quickopentestbase)
if(NOT COMPILER_OPTIMIZATIONS_DISABLED)
......
......@@ -10,6 +10,6 @@ set(reviewboardtest_SRCS
qt5_wrap_ui(reviewboardtest_SRCS ../reviewpatch.ui)
add_executable(reviewboardtest ${reviewboardtest_SRCS})
target_link_libraries(reviewboardtest KDev::Interfaces KF5::KIOWidgets KF5::KDELibs4Support)
target_link_libraries(reviewboardtest KDev::Interfaces KF5::KIOWidgets)
......@@ -8,7 +8,7 @@ qt5_wrap_ui(kdevtemplatemanager_config_SRCS templateconfig.ui templatepage.ui)
add_library( kdevtemplatemanager_config MODULE ${kdevtemplatemanager_config_SRCS} )
target_link_libraries( kdevtemplatemanager_config KF5::ConfigWidgets KF5::Service KF5::KIOWidgets KF5::NewStuff KF5::Archive KDev::Interfaces KDev::Language)
target_link_libraries( kdevtemplatemanager_config KF5::ConfigWidgets KF5::Service KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KDev::Interfaces KDev::Language)
install(TARGETS kdevtemplatemanager_config DESTINATION ${PLUGIN_INSTALL_DIR}/kdevplatform/${KDEV_PLUGIN_VERSION}/kcm)
configure_file(kdevtemplatemanager_config.desktop.cmake ${CMAKE_CURRENT_BINARY_DIR}/kdevtemplatemanager_config.desktop)
......
......@@ -23,12 +23,12 @@
#include <interfaces/itemplateprovider.h>
#include <language/codegen/templatesmodel.h>
#include <KFileDialog>
#include <QFileDialog>
#include <KNS3/DownloadDialog>