diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d65b3b4..2c89d18e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,18 +1,14 @@ -project (kde-playground) +project(kde-playground) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules") -set(QT_MIN_VERSION "4.8.2") -find_package(KDE4 4.14.3 REQUIRED) +find_package(KDE4 4.18.0 REQUIRED) include(KDE4Defaults) -include(GenerateExportHeader) set(LIBRARY_TYPE SHARED) add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) -add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES}) +include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) macro_optional_add_subdirectory (kdbg) macro_optional_add_subdirectory (pykde4) diff --git a/kaffeine/src/mainwindow.cpp b/kaffeine/src/mainwindow.cpp index f96af222..50eeb473 100644 --- a/kaffeine/src/mainwindow.cpp +++ b/kaffeine/src/mainwindow.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -149,7 +149,7 @@ MainWindow::MainWindow() { // menu structure - KMenuBar *menuBar = KMainWindow::menuBar(); + QMenuBar *menuBar = KMainWindow::menuBar(); collection = new KActionCollection(this); KMenu *menu = new KMenu(i18n("&File"), this); diff --git a/kamera/kcontrol/kamera.cpp b/kamera/kcontrol/kamera.cpp index a3cd6791..e177092e 100644 --- a/kamera/kcontrol/kamera.cpp +++ b/kamera/kcontrol/kamera.cpp @@ -29,7 +29,6 @@ #include #include -#include #include #include #include diff --git a/kamera/kioslave/kamera.cpp b/kamera/kioslave/kamera.cpp index 081e96f6..2f2f2bf8 100644 --- a/kamera/kioslave/kamera.cpp +++ b/kamera/kioslave/kamera.cpp @@ -58,7 +58,7 @@ using namespace KIO; extern "C" { - KDE_EXPORT int kdemain(int argc, char **argv); + Q_DECL_EXPORT int kdemain(int argc, char **argv); #ifdef HAVE_GPHOTO2_5 static void frontendCameraStatus(GPContext *context, const char *status, void *data); diff --git a/kcachegrind/libcore/CMakeLists.txt b/kcachegrind/libcore/CMakeLists.txt index dfbe0f66..8c4c9546 100644 --- a/kcachegrind/libcore/CMakeLists.txt +++ b/kcachegrind/libcore/CMakeLists.txt @@ -14,7 +14,7 @@ set(core_SRCS utils.cpp logger.cpp config.cpp - globalconfig.cpp ) + globalconfig.cpp +) -qt4_automoc(${core_SRCS}) add_library(core STATIC ${core_SRCS}) diff --git a/kcachegrind/libviews/CMakeLists.txt b/kcachegrind/libviews/CMakeLists.txt index 7183f4c9..e5fa4c38 100644 --- a/kcachegrind/libviews/CMakeLists.txt +++ b/kcachegrind/libviews/CMakeLists.txt @@ -28,8 +28,8 @@ set(libviews_SRCS coverageitem.cpp sourceitem.cpp instritem.cpp - partlistitem.cpp ) + partlistitem.cpp +) -qt4_automoc(${libviews_SRCS}) add_library(views STATIC ${libviews_SRCS}) target_link_libraries(views core) diff --git a/kcachegrind/qcachegrind/CMakeLists.txt b/kcachegrind/qcachegrind/CMakeLists.txt index 6af19835..c35ba585 100644 --- a/kcachegrind/qcachegrind/CMakeLists.txt +++ b/kcachegrind/qcachegrind/CMakeLists.txt @@ -4,7 +4,6 @@ set(qcachegrind_SRCS qcgmain.cpp qcgtoplevel.cpp qcgconfig.cpp configdialog.cpp configpage.cpp qtcolorbutton.cpp generalsettings.cpp sourcesettings.cpp colorsettings.cpp) -qt4_automoc(${qcachegrind_SRCS}) qt4_wrap_ui(qcachegrind_H generalsettings.ui sourcesettings.ui colorsettings.ui) qt4_add_resources(qcachegrind_RSRC qcachegrind.qrc) diff --git a/kdbg/CMakeLists.txt b/kdbg/CMakeLists.txt index 1b74d657..15bfb28a 100644 --- a/kdbg/CMakeLists.txt +++ b/kdbg/CMakeLists.txt @@ -9,8 +9,6 @@ add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) include(KDE4Defaults) include(MacroLibrary) -#include(ManualStuff.cmake) -#include(ConfigureChecks.cmake) add_subdirectory(kdbg) add_subdirectory(po) diff --git a/kdbg/kdbg/CMakeLists.txt b/kdbg/kdbg/CMakeLists.txt index 8e6b88fc..141aeb18 100644 --- a/kdbg/kdbg/CMakeLists.txt +++ b/kdbg/kdbg/CMakeLists.txt @@ -4,6 +4,7 @@ add_subdirectory(typetables) include_directories(${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ) include(CheckFunctionExists) +include(CheckIncludeFiles) CHECK_INCLUDE_FILES(pty.h HAVE_PTY_H) CHECK_INCLUDE_FILES(libutil.h HAVE_LIBUTIL_H) diff --git a/kdbg/kdbg/debugger.cpp b/kdbg/kdbg/debugger.cpp index c5fd9941..6ddd4579 100644 --- a/kdbg/kdbg/debugger.cpp +++ b/kdbg/kdbg/debugger.cpp @@ -13,7 +13,6 @@ #include #include #include -#include // KMD5 #include #include /* i18n */ #include @@ -677,7 +676,7 @@ QString KDebugger::getConfigForExe(const QString& name) // a hash of the directory, followed by the program name. // Assume that the first 15 positions of the hash are unique; // this keeps the file names short. - QString hash = KMD5(dir.toUtf8()).base64Digest(); + QString hash = dir.toUtf8().toBase64(); hash.replace('/', QString()); // avoid directory separators QString pgmConfigFile = hash.left(15) + "-" + fi.fileName(); pgmConfigFile = KStandardDirs::locateLocal("sessions", pgmConfigFile); diff --git a/khelpcenter/application.cpp b/khelpcenter/application.cpp index deace3b0..5685c3f2 100644 --- a/khelpcenter/application.cpp +++ b/khelpcenter/application.cpp @@ -21,11 +21,11 @@ #include "application.h" #include "mainwindow.h" -#include "version.h" #include #include #include +#include using namespace KHC; @@ -56,7 +56,7 @@ int Application::newInstance() int main( int argc, char **argv ) { KAboutData aboutData( "khelpcenter", 0, ki18n("KDE Help Center"), - HELPCENTER_VERSION, + KDE_VERSION_STRING, ki18n("The KDE Help Center"), KAboutData::License_GPL, ki18n("(c) 1999-2011, The KHelpCenter developers") ); diff --git a/khelpcenter/application.h b/khelpcenter/application.h index 0d5cf416..5256acfe 100644 --- a/khelpcenter/application.h +++ b/khelpcenter/application.h @@ -41,7 +41,7 @@ namespace KHC { } -extern "C" { int KDE_EXPORT kdemain(int argc, char **argv); } +extern "C" { int Q_DECL_EXPORT kdemain(int argc, char **argv); } #endif // KHC_APPLICATION_H // vim:ts=2:sw=2:et diff --git a/khelpcenter/docentry.cpp b/khelpcenter/docentry.cpp index bd74e226..1d255db8 100644 --- a/khelpcenter/docentry.cpp +++ b/khelpcenter/docentry.cpp @@ -256,7 +256,7 @@ bool DocEntry::docExists() const if ( !mUrl.isEmpty() ) { KUrl docUrl( mUrl ); - if ( docUrl.isLocalFile() && !KStandardDirs::exists( docUrl.toLocalFile() ) ) + if ( docUrl.isLocalFile() && !KGlobal::dirs()->exists( docUrl.toLocalFile() ) ) { return false; } diff --git a/khelpcenter/htmlsearch/htmlsearch.cpp b/khelpcenter/htmlsearch/htmlsearch.cpp index e52c484c..5f3539b3 100644 --- a/khelpcenter/htmlsearch/htmlsearch.cpp +++ b/khelpcenter/htmlsearch/htmlsearch.cpp @@ -33,7 +33,7 @@ void HTMLSearch::scanDir(const QString& dir) QStringList::ConstIterator it; - if ( KStandardDirs::exists( dir + "index.docbook" ) ) { + if ( KGlobal::dirs()->exists( dir + "index.docbook" ) ) { _files.append(dir + "index.docbook"); progress->setFilesScanned(++_filesScanned); } else { diff --git a/khelpcenter/kcmhelpcenter.cpp b/khelpcenter/kcmhelpcenter.cpp index 5d5d811c..4ab5ccdd 100644 --- a/khelpcenter/kcmhelpcenter.cpp +++ b/khelpcenter/kcmhelpcenter.cpp @@ -628,7 +628,8 @@ void KCMHelpCenter::slotReceivedStdout() mStdOut.append( text ); } else { if ( mProgressDialog ) { - mProgressDialog->appendLog( mStdOut + text.left( pos ) ); + QByteArray logtext = mStdOut + text.left( pos ); + mProgressDialog->appendLog( logtext ); mStdOut = text.mid( pos + 1 ); } } diff --git a/khelpcenter/khc_indexbuilder.cpp b/khelpcenter/khc_indexbuilder.cpp index 4926ff55..0ba4d8d5 100644 --- a/khelpcenter/khc_indexbuilder.cpp +++ b/khelpcenter/khc_indexbuilder.cpp @@ -21,8 +21,6 @@ #include "khc_indexbuilder.h" -#include "version.h" - #include #include #include @@ -31,6 +29,7 @@ #include #include #include +#include #include #include @@ -152,7 +151,7 @@ int main( int argc, char **argv ) { KAboutData aboutData( "khc_indexbuilder", 0, ki18n("KHelpCenter Index Builder"), - HELPCENTER_VERSION, + KDE_VERSION_STRING, ki18n("The KDE Help Center"), KAboutData::License_GPL, ki18n("(c) 2003, The KHelpCenter developers") ); diff --git a/khelpcenter/slave/kio_help.cpp b/khelpcenter/slave/kio_help.cpp index 73feb679..212a8991 100644 --- a/khelpcenter/slave/kio_help.cpp +++ b/khelpcenter/slave/kio_help.cpp @@ -232,7 +232,7 @@ void HelpProtocol::get( const KUrl& url ) } } else { QString docbook_file = file.left(file.lastIndexOf('/')) + "/index.docbook"; - if (!KStandardDirs::exists(file)) { + if (!KGlobal::dirs()->exists(file)) { file = docbook_file; } else { QFileInfo fi(file); diff --git a/khelpcenter/slave/main.cpp b/khelpcenter/slave/main.cpp index 142c1a6c..f82b00b1 100644 --- a/khelpcenter/slave/main.cpp +++ b/khelpcenter/slave/main.cpp @@ -33,7 +33,7 @@ extern "C" int xmlLoadExtDtdDefaultValue; extern "C" { - KDE_EXPORT int kdemain( int argc, char **argv ) + Q_DECL_EXPORT int kdemain( int argc, char **argv ) { Q_ASSERT(!KGlobal::hasMainComponent()); // kdeinit is messed up if this is the case. KComponentData componentData( "kio_help", "kio_help4" ); diff --git a/khelpcenter/slave/xslt.cpp b/khelpcenter/slave/xslt.cpp index 23fc4129..e2f452ea 100644 --- a/khelpcenter/slave/xslt.cpp +++ b/khelpcenter/slave/xslt.cpp @@ -115,7 +115,7 @@ xmlParserInputPtr meinExternalEntityLoader(const char *URL, const char *ID, URL = "docbook/xml-dtd-4.1.2/docbookx.dtd"; QString file; - if (KStandardDirs::exists( QDir::currentPath() + "/" + URL ) ) + if (KGlobal::dirs()->exists( QDir::currentPath() + "/" + URL ) ) file = QDir::currentPath() + "/" + URL; else file = locate("dtd", URL); diff --git a/khelpcenter/version.h b/khelpcenter/version.h deleted file mode 100644 index 1535474f..00000000 --- a/khelpcenter/version.h +++ /dev/null @@ -1,8 +0,0 @@ - -#ifndef KHC_VERSION_H -#define KHC_VERSION_H - -#define HELPCENTER_VERSION KDE_VERSION_STRING - -#endif // KHC_VERSION_H -// vim:ts=2:sw=2:et