From 3bdd15416183b3cd6aa8f050125f21d440842a4b Mon Sep 17 00:00:00 2001 From: Jignesh Kakadiya Date: Fri, 15 Jun 2012 19:35:18 +0530 Subject: [PATCH 1/3] Use kcoreauthorized.h instead of kauthorized.h --- applet.cpp | 2 +- containment.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applet.cpp b/applet.cpp index 11f792733..e7a52915f 100644 --- a/applet.cpp +++ b/applet.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #include #include #include diff --git a/containment.cpp b/containment.cpp index 5529a0b65..bf7c34b7e 100644 --- a/containment.cpp +++ b/containment.cpp @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include #include From 5534b9cfa000878e2ea1d705c8c9859725e7bef3 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 16 Jun 2012 22:06:11 +0200 Subject: [PATCH 2/3] plasma ported to generate_export_header -- this was the last one. --- CMakeLists.txt | 4 +++- plasma_export.h | 43 ------------------------------------------- widgets/lineedit.h | 4 ++-- 3 files changed, 5 insertions(+), 46 deletions(-) delete mode 100644 plasma_export.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 05e8b08cf..2eca0dcad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ endif(NOT Q_WS_X11) include_directories(${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES} ${CMAKE_SOURCE_DIR}/experimental/libkdeclarative @@ -325,6 +326,7 @@ install(TARGETS plasma EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_AR install(TARGETS plasmaqgv EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### +generate_export_header(plasma) set(plasma_LIB_INCLUDES abstractdialogmanager.h @@ -349,7 +351,7 @@ set(plasma_LIB_INCLUDES package.h packagestructure.h plasma.h - plasma_export.h + ${CMAKE_CURRENT_BINARY_DIR}/plasma_export.h popupapplet.h querymatch.h remote/accessappletjob.h diff --git a/plasma_export.h b/plasma_export.h deleted file mode 100644 index 9f87be1ea..000000000 --- a/plasma_export.h +++ /dev/null @@ -1,43 +0,0 @@ -/* This file is part of the KDE project - Copyright 2007 Aaron Seigo - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - 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 PLASMA_EXPORT_H -#define PLASMA_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef PLASMA_EXPORT -# if defined(KDELIBS_STATIC_LIBS) - /* No export/import for static libraries */ -# define PLASMA_EXPORT -# elif defined(MAKE_PLASMA_LIB) - /* We are building this library */ -# define PLASMA_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define PLASMA_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef PLASMA_EXPORT_DEPRECATED -# define PLASMA_EXPORT_DEPRECATED KDE_DEPRECATED PLASMA_EXPORT -# endif - -#endif diff --git a/widgets/lineedit.h b/widgets/lineedit.h index 43d3a39e4..1d35ad312 100644 --- a/widgets/lineedit.h +++ b/widgets/lineedit.h @@ -86,7 +86,7 @@ public: * @deprecated use LineEdit::setPlaceholderText instead */ #ifndef KDE_NO_DEPRECATED - void KDE_DEPRECATED setClickMessage(const QString &message); + void PLASMA_DEPRECATED setClickMessage(const QString &message); #endif /** @@ -95,7 +95,7 @@ public: * @deprecated use LineEdit::placeholderText instead */ #ifndef KDE_NO_DEPRECATED - QString KDE_DEPRECATED clickMessage() const; + QString PLASMA_DEPRECATED clickMessage() const; #endif /** From 362a0a9372938b100be391fce428a781f7daf1ae Mon Sep 17 00:00:00 2001 From: Jignesh Kakadiya Date: Mon, 18 Jun 2012 13:11:26 +0530 Subject: [PATCH 3/3] KGlobal::mainComponent().componentName() should be replaced with QCoreApplication::instance()->applicationName() --- abstracttoolbox.cpp | 4 +++- coronabase.cpp | 5 ++--- pluginloader.cpp | 9 ++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/abstracttoolbox.cpp b/abstracttoolbox.cpp index 1ca59d261..a51b81417 100644 --- a/abstracttoolbox.cpp +++ b/abstracttoolbox.cpp @@ -19,6 +19,8 @@ #include "abstracttoolbox.h" +#include + #include "containment.h" #include @@ -78,7 +80,7 @@ KPluginInfo::List AbstractToolBox::listToolBoxInfo(const QString { KPluginInfo::List list; - if (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName()) { + if (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName()) { list = KPluginInfo::List(); } diff --git a/coronabase.cpp b/coronabase.cpp index 3fc8fa216..da6cc07d4 100644 --- a/coronabase.cpp +++ b/coronabase.cpp @@ -35,7 +35,6 @@ #include #include -#include #include #include #include @@ -91,7 +90,7 @@ void CoronaBase::setDefaultContainmentPlugin(const QString &name) { // we could check if it is in: // Containment::listContainments().contains(name) || - // Containment::listContainments(QString(), KGlobal::mainComponent().componentName()).contains(name) + // Containment::listContainments(QString(), QCoreApplication::instance()->applicationName()).contains(name) // but that seems like overkill d->defaultContainmentPlugin = name; } @@ -454,7 +453,7 @@ CoronaBasePrivate::CoronaBasePrivate(CoronaBase *corona) actions(corona) { if (KGlobal::hasMainComponent()) { - configName = KGlobal::mainComponent().componentName() + "-appletsrc"; + configName = QCoreApplication::instance()->applicationName() + "-appletsrc"; } else { configName = "plasma-appletsrc"; } diff --git a/pluginloader.cpp b/pluginloader.cpp index fed65c4a2..98a3db1d3 100644 --- a/pluginloader.cpp +++ b/pluginloader.cpp @@ -20,7 +20,6 @@ #include "pluginloader.h" #include -#include #include #include #include @@ -401,7 +400,7 @@ KPluginInfo::List PluginLoader::listAppletInfo(const QString &category, const QS { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalAppletInfo(category); } @@ -435,7 +434,7 @@ KPluginInfo::List PluginLoader::listDataEngineInfo(const QString &parentApp) { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalDataEngineInfo(); } @@ -454,7 +453,7 @@ KPluginInfo::List PluginLoader::listRunnerInfo(const QString &parentApp) { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalRunnerInfo(); } @@ -473,7 +472,7 @@ KPluginInfo::List PluginLoader::listContainmentActionsInfo(const QString &parent { KPluginInfo::List list; - if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == KGlobal::mainComponent().componentName())) { + if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) { list = internalContainmentActionsInfo(); }