From debd191d6bf20ed8a3fe5aa6a7acc65a60e3c697 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 25 Sep 2015 11:03:31 +0000 Subject: [PATCH] kdepim: fix some build issues --- kdepim/composereditor-ng/CMakeLists.txt | 3 +- .../spellplugin/kspellplugin.cpp | 3 + .../spellplugin/kspellplugin.h | 2 +- .../spellplugin/qwebkitplatformplugin.h | 201 ++++++++++++++++++ kdepim/kalarm/CMakeLists.txt | 8 - kdepim/kleopatra/CMakeLists.txt | 4 +- kdepim/kleopatra/ConfigureChecks.cmake | 7 - kdepim/kleopatra/config-kleopatra.h.cmake | 4 - kdepim/kleopatra/dialogs/adduseriddialog.cpp | 3 +- .../dialogs/lookupcertificatesdialog.cpp | 1 + .../libkleopatraclient/core/CMakeLists.txt | 2 +- .../core/decryptverifyfilescommand.h | 2 +- .../core/{command.cpp => kleocommand.cpp} | 4 +- .../core/{command.h => kleocommand.h} | 0 .../core/{command_p.h => kleocommand_p.h} | 2 +- .../core/selectcertificatecommand.h | 2 +- .../core/signencryptfilescommand.h | 2 +- kdepim/kleopatra/main.cpp | 12 -- ...{mainwindow_desktop.cpp => mainwindow.cpp} | 17 +- kdepim/kleopatra/mainwindow.h | 55 ++++- kdepim/kleopatra/mainwindow_desktop.h | 77 ------- kdepim/kleopatra/selftest/uiservercheck.cpp | 2 +- kdepim/kresources/CMakeLists.txt | 20 -- 23 files changed, 266 insertions(+), 167 deletions(-) create mode 100644 kdepim/composereditor-ng/spellplugin/qwebkitplatformplugin.h rename kdepim/kleopatra/libkleopatraclient/core/{command.cpp => kleocommand.cpp} (99%) rename kdepim/kleopatra/libkleopatraclient/core/{command.h => kleocommand.h} (100%) rename kdepim/kleopatra/libkleopatraclient/core/{command_p.h => kleocommand_p.h} (99%) rename kdepim/kleopatra/{mainwindow_desktop.cpp => mainwindow.cpp} (98%) delete mode 100644 kdepim/kleopatra/mainwindow_desktop.h diff --git a/kdepim/composereditor-ng/CMakeLists.txt b/kdepim/composereditor-ng/CMakeLists.txt index 212f3245..4263e007 100644 --- a/kdepim/composereditor-ng/CMakeLists.txt +++ b/kdepim/composereditor-ng/CMakeLists.txt @@ -7,6 +7,8 @@ add_definitions( -DQT_NO_CAST_TO_ASCII ) # Laurent install it if you want to debug it #add_subdirectory(tests) +add_definitions(-DQT_STATICPLUGIN) + set(libcomposereditor_ng_SRCS composereditor.cpp composerview.cpp @@ -47,7 +49,6 @@ target_link_libraries(composereditorng ${KDE4_KDEWEBKIT_LIBRARY} ${QT_QTWEBKIT_LIBRARY} ${KDEPIMLIBS_KPIMTEXTEDIT_LIBS} ${KDE4_KPRINTUTILS_LIBS} ) - set_target_properties( composereditorng PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) install(TARGETS composereditorng ${INSTALL_TARGETS_DEFAULT_ARGS} ) install( FILES data/composereditorinitialhtml DESTINATION ${DATA_INSTALL_DIR}/composereditor ) diff --git a/kdepim/composereditor-ng/spellplugin/kspellplugin.cpp b/kdepim/composereditor-ng/spellplugin/kspellplugin.cpp index ee227104..4ef2330b 100644 --- a/kdepim/composereditor-ng/spellplugin/kspellplugin.cpp +++ b/kdepim/composereditor-ng/spellplugin/kspellplugin.cpp @@ -191,3 +191,6 @@ QObject* KWebKitPlatformPlugin::createExtension(Extension ext) const Q_EXPORT_PLUGIN2(kwebspellchecker, KWebKitPlatformPlugin) Q_IMPORT_PLUGIN(kwebspellchecker) + +#include "moc_qwebkitplatformplugin.cpp" + diff --git a/kdepim/composereditor-ng/spellplugin/kspellplugin.h b/kdepim/composereditor-ng/spellplugin/kspellplugin.h index f7f3bba9..e6ad439d 100644 --- a/kdepim/composereditor-ng/spellplugin/kspellplugin.h +++ b/kdepim/composereditor-ng/spellplugin/kspellplugin.h @@ -30,7 +30,7 @@ #include #include -#include +#include "qwebkitplatformplugin.h" #include class KWebSpellChecker : public QWebSpellChecker diff --git a/kdepim/composereditor-ng/spellplugin/qwebkitplatformplugin.h b/kdepim/composereditor-ng/spellplugin/qwebkitplatformplugin.h new file mode 100644 index 00000000..ff620172 --- /dev/null +++ b/kdepim/composereditor-ng/spellplugin/qwebkitplatformplugin.h @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * Copyright (C) 2012 by Lindsay Mathieson + * + * 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 QWEBKITPLATFORMPLUGIN_H +#define QWEBKITPLATFORMPLUGIN_H + +/* + * Warning: The contents of this file is not part of the public QtWebKit API + * and may be changed from version to version or even be completely removed. +*/ + +#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA +#include +#endif +#include +#include +#include +#include +#include + +class QWebSelectData +{ +public: + virtual ~QWebSelectData() {} + + enum ItemType { Option, Group, Separator }; + + virtual ItemType itemType(int) const = 0; + virtual QString itemText(int index) const = 0; + virtual QString itemToolTip(int index) const = 0; + virtual bool itemIsEnabled(int index) const = 0; + virtual bool itemIsSelected(int index) const = 0; + virtual int itemCount() const = 0; + virtual bool multiple() const = 0; + virtual QColor backgroundColor() const = 0; + virtual QColor foregroundColor() const = 0; + virtual QColor itemBackgroundColor(int index) const = 0; + virtual QColor itemForegroundColor(int index) const = 0; +}; + +class QWebSelectMethod : public QObject +{ + Q_OBJECT +public: + virtual ~QWebSelectMethod() {} + + virtual void show(const QWebSelectData&) = 0; + virtual void hide() = 0; + virtual void setGeometry(const QRect&) = 0; + virtual void setFont(const QFont&) = 0; + +Q_SIGNALS: + void selectItem(int index, bool allowMultiplySelections, bool shift); + void didHide(); +}; + +class QWebNotificationData +{ +public: + virtual ~QWebNotificationData() {} + + virtual const QString title() const = 0; + virtual const QString message() const = 0; + virtual const QUrl iconUrl() const = 0; + virtual const QUrl openerPageUrl() const = 0; +}; + +class QWebNotificationPresenter : public QObject +{ + Q_OBJECT +public: + QWebNotificationPresenter() {} + virtual ~QWebNotificationPresenter() {} + + virtual void showNotification(const QWebNotificationData*) = 0; + +Q_SIGNALS: + void notificationClosed(); + void notificationClicked(); +}; + +class QWebHapticFeedbackPlayer: public QObject +{ + Q_OBJECT +public: + QWebHapticFeedbackPlayer() {} + virtual ~QWebHapticFeedbackPlayer() {} + + enum HapticStrength + { + None, Weak, Medium, Strong + }; + + enum HapticEvent + { + Press, Release + }; + + virtual void playHapticFeedback(const HapticEvent, const QString& hapticType, const HapticStrength) = 0; +}; + +class QWebTouchModifier : public QObject +{ + Q_OBJECT +public: + virtual ~QWebTouchModifier() {} + + enum PaddingDirection + { + Up, Right, Down, Left + }; + + virtual unsigned hitTestPaddingForTouch(const PaddingDirection) const = 0; +}; + +#if defined(WTF_USE_QT_MULTIMEDIA) && WTF_USE_QT_MULTIMEDIA +class QWebFullScreenVideoHandler : public QObject +{ + Q_OBJECT +public: + QWebFullScreenVideoHandler() {} + virtual ~QWebFullScreenVideoHandler() {} + virtual bool requiresFullScreenForVideoPlayback() const = 0; + +Q_SIGNALS: + void fullScreenClosed(); + +public Q_SLOTS: + virtual void enterFullScreen(QMediaPlayer*) = 0; + virtual void exitFullScreen() = 0; +}; +#endif + +class QWebSpellChecker : public QObject +{ + Q_OBJECT +public: + struct GrammarDetail + { + int location; + int length; + QStringList guesses; + QString userDescription; + }; + + virtual bool isContinousSpellCheckingEnabled() const = 0; + virtual void toggleContinousSpellChecking() = 0; + + virtual void learnWord(const QString& word) = 0; + virtual void ignoreWordInSpellDocument(const QString& word) = 0; + virtual void checkSpellingOfString(const QString& word, int* misspellingLocation, int* misspellingLength) = 0; + virtual QString autoCorrectSuggestionForMisspelledWord(const QString& word) = 0; + virtual void guessesForWord(const QString& word, const QString& context, QStringList& guesses) = 0; + + virtual bool isGrammarCheckingEnabled() = 0; + virtual void toggleGrammarChecking() = 0; + virtual void checkGrammarOfString(const QString&, QList&, int* badGrammarLocation, int* badGrammarLength) = 0; +}; + +class QWebKitPlatformPlugin +{ +public: + virtual ~QWebKitPlatformPlugin() {} + + enum Extension + { + MultipleSelections, + Notifications, + Haptics, + TouchInteraction, + FullScreenVideoPlayer, + SpellChecker + }; + + virtual bool supportsExtension(Extension) const = 0; + virtual QObject* createExtension(Extension) const = 0; +}; + +QT_BEGIN_NAMESPACE +Q_DECLARE_INTERFACE(QWebKitPlatformPlugin, "com.nokia.Qt.WebKit.PlatformPlugin/1.9") +QT_END_NAMESPACE + +#endif // QWEBKITPLATFORMPLUGIN_H \ No newline at end of file diff --git a/kdepim/kalarm/CMakeLists.txt b/kdepim/kalarm/CMakeLists.txt index 5f466f12..7733289d 100644 --- a/kdepim/kalarm/CMakeLists.txt +++ b/kdepim/kalarm/CMakeLists.txt @@ -6,8 +6,6 @@ add_definitions(-DQT_STRICT_ITERATORS) add_definitions( -DQT_NO_CAST_FROM_ASCII ) add_definitions( -DQT_NO_CAST_TO_ASCII ) -set(CMAKE_AUTOMOC_RELAXED_MODE ON) - option(KALARM_USE_AKONADI "Build to use Akonadi" ON) # Kalarm from kdepim master needs kdepimlibs 4.7 @@ -25,12 +23,6 @@ endif() if(KALARM_USE_AKONADI) add_definitions(-DUSE_AKONADI) - if (NOT CMAKE_VERSION VERSION_LESS 2.8.12 AND (CMAKE_VERSION VERSION_LESS 2.8.12.1 - OR CMAKE_VERSION VERSION_LESS 2.8.13 # Temporary measure because build.kde.org uses a datestamped CMake version - )) - # http://public.kitware.com/Bug/view.php?id=14535 - set(CMAKE_AUTOMOC_MOC_OPTIONS -DUSE_AKONADI) - endif() else() add_definitions(-DUSE_KRESOURCES) add_definitions( diff --git a/kdepim/kleopatra/CMakeLists.txt b/kdepim/kleopatra/CMakeLists.txt index 4e532a65..f6c71078 100644 --- a/kdepim/kleopatra/CMakeLists.txt +++ b/kdepim/kleopatra/CMakeLists.txt @@ -94,7 +94,7 @@ if(USABLE_ASSUAN_FOUND) uiserver/createchecksumscommand.cpp uiserver/verifychecksumscommand.cpp - libkleopatraclient/core/command.cpp + libkleopatraclient/core/kleocommand.cpp selftest/uiservercheck.cpp ) @@ -312,7 +312,7 @@ endif() add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5151) -add_executable(kleopatra_bin ${_kleopatra_SRCS} mainwindow_desktop.cpp ${_kleopatra_uiserver_SRCS} ${_kleopatra_libkdepim_SRCS}) +add_executable(kleopatra_bin ${_kleopatra_SRCS} mainwindow.cpp ${_kleopatra_uiserver_SRCS} ${_kleopatra_libkdepim_SRCS}) set_target_properties(kleopatra_bin PROPERTIES OUTPUT_NAME kleopatra) target_link_libraries(kleopatra_bin diff --git a/kdepim/kleopatra/ConfigureChecks.cmake b/kdepim/kleopatra/ConfigureChecks.cmake index 51cede55..1e90d042 100644 --- a/kdepim/kleopatra/ConfigureChecks.cmake +++ b/kdepim/kleopatra/ConfigureChecks.cmake @@ -26,13 +26,6 @@ if ( ASSUAN${ASSUAN_SUFFIX}_FOUND ) set( USABLE_ASSUAN_FOUND true ) endif( ASSUAN2_FOUND ) - # TODO: this workaround will be removed as soon as we find better solution - if(MINGW) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/mingw) - elseif(MSVC) - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN32_INCLUDE_DIR}/msvc) - endif(MINGW) - endif( ASSUAN${ASSUAN_SUFFIX}_FOUND ) if ( USABLE_ASSUAN_FOUND ) diff --git a/kdepim/kleopatra/config-kleopatra.h.cmake b/kdepim/kleopatra/config-kleopatra.h.cmake index 31447982..0eec7c95 100644 --- a/kdepim/kleopatra/config-kleopatra.h.cmake +++ b/kdepim/kleopatra/config-kleopatra.h.cmake @@ -26,12 +26,8 @@ #endif #if !defined(KPATH_SEPARATOR) -#if defined _WIN32 || defined _WIN64 -#define KPATH_SEPARATOR ';' -#else #define KPATH_SEPARATOR ':' #endif -#endif /* Mirrored from cmake option */ #cmakedefine KLEO_STATIC_KCMODULES 1 diff --git a/kdepim/kleopatra/dialogs/adduseriddialog.cpp b/kdepim/kleopatra/dialogs/adduseriddialog.cpp index 77242959..8e67613a 100644 --- a/kdepim/kleopatra/dialogs/adduseriddialog.cpp +++ b/kdepim/kleopatra/dialogs/adduseriddialog.cpp @@ -40,11 +40,10 @@ #include -#include -#include #include #include +#include #include #include #include diff --git a/kdepim/kleopatra/dialogs/lookupcertificatesdialog.cpp b/kdepim/kleopatra/dialogs/lookupcertificatesdialog.cpp index b1480b23..e5ad54eb 100644 --- a/kdepim/kleopatra/dialogs/lookupcertificatesdialog.cpp +++ b/kdepim/kleopatra/dialogs/lookupcertificatesdialog.cpp @@ -45,6 +45,7 @@ #include +#include #include #include diff --git a/kdepim/kleopatra/libkleopatraclient/core/CMakeLists.txt b/kdepim/kleopatra/libkleopatraclient/core/CMakeLists.txt index f509e79d..a1dd36cb 100644 --- a/kdepim/kleopatra/libkleopatraclient/core/CMakeLists.txt +++ b/kdepim/kleopatra/libkleopatraclient/core/CMakeLists.txt @@ -11,7 +11,7 @@ add_definitions( add_library(kleopatraclientcore ${LIBRARY_TYPE} initialization.cpp - command.cpp + kleocommand.cpp selectcertificatecommand.cpp signencryptfilescommand.cpp decryptverifyfilescommand.cpp diff --git a/kdepim/kleopatra/libkleopatraclient/core/decryptverifyfilescommand.h b/kdepim/kleopatra/libkleopatraclient/core/decryptverifyfilescommand.h index aae3b7f4..57c25476 100644 --- a/kdepim/kleopatra/libkleopatraclient/core/decryptverifyfilescommand.h +++ b/kdepim/kleopatra/libkleopatraclient/core/decryptverifyfilescommand.h @@ -22,7 +22,7 @@ #ifndef __LIBKLEOPATRACLIENT_CORE_DECRYPTVERIFYFILESCOMMAND_H__ #define __LIBKLEOPATRACLIENT_CORE_DECRYPTVERIFYFILESCOMMAND_H__ -#include +#include namespace KLEOPATRACLIENT_NAMESPACE { diff --git a/kdepim/kleopatra/libkleopatraclient/core/command.cpp b/kdepim/kleopatra/libkleopatraclient/core/kleocommand.cpp similarity index 99% rename from kdepim/kleopatra/libkleopatraclient/core/command.cpp rename to kdepim/kleopatra/libkleopatraclient/core/kleocommand.cpp index c32de6d4..d83a4fe0 100644 --- a/kdepim/kleopatra/libkleopatraclient/core/command.cpp +++ b/kdepim/kleopatra/libkleopatraclient/core/kleocommand.cpp @@ -21,8 +21,8 @@ #include -#include "command.h" -#include "command_p.h" +#include "kleocommand.h" +#include "kleocommand_p.h" #include // Q_OS_WIN diff --git a/kdepim/kleopatra/libkleopatraclient/core/command.h b/kdepim/kleopatra/libkleopatraclient/core/kleocommand.h similarity index 100% rename from kdepim/kleopatra/libkleopatraclient/core/command.h rename to kdepim/kleopatra/libkleopatraclient/core/kleocommand.h diff --git a/kdepim/kleopatra/libkleopatraclient/core/command_p.h b/kdepim/kleopatra/libkleopatraclient/core/kleocommand_p.h similarity index 99% rename from kdepim/kleopatra/libkleopatraclient/core/command_p.h rename to kdepim/kleopatra/libkleopatraclient/core/kleocommand_p.h index 98a45093..98f7a8fd 100644 --- a/kdepim/kleopatra/libkleopatraclient/core/command_p.h +++ b/kdepim/kleopatra/libkleopatraclient/core/kleocommand_p.h @@ -21,7 +21,7 @@ #ifndef __LIBKLEOPATRACLIENT_CORE_COMMAND_P_H__ #define __LIBKLEOPATRACLIENT_CORE_COMMAND_P_H__ -#include "command.h" +#include "kleocommand.h" #include #include diff --git a/kdepim/kleopatra/libkleopatraclient/core/selectcertificatecommand.h b/kdepim/kleopatra/libkleopatraclient/core/selectcertificatecommand.h index 2c126140..e6506f82 100644 --- a/kdepim/kleopatra/libkleopatraclient/core/selectcertificatecommand.h +++ b/kdepim/kleopatra/libkleopatraclient/core/selectcertificatecommand.h @@ -22,7 +22,7 @@ #ifndef __LIBKLEOPATRACLIENT_CORE_SELECTCERTIFICATECOMMAND_H__ #define __LIBKLEOPATRACLIENT_CORE_SELECTCERTIFICATECOMMAND_H__ -#include +#include namespace KLEOPATRACLIENT_NAMESPACE { diff --git a/kdepim/kleopatra/libkleopatraclient/core/signencryptfilescommand.h b/kdepim/kleopatra/libkleopatraclient/core/signencryptfilescommand.h index 560e6915..c9742176 100644 --- a/kdepim/kleopatra/libkleopatraclient/core/signencryptfilescommand.h +++ b/kdepim/kleopatra/libkleopatraclient/core/signencryptfilescommand.h @@ -22,7 +22,7 @@ #ifndef __LIBKLEOPATRACLIENT_CORE_SIGNENCRYPTFILESCOMMAND_H__ #define __LIBKLEOPATRACLIENT_CORE_SIGNENCRYPTFILESCOMMAND_H__ -#include +#include namespace KLEOPATRACLIENT_NAMESPACE { diff --git a/kdepim/kleopatra/main.cpp b/kdepim/kleopatra/main.cpp index 6f195615..105b42ee 100644 --- a/kdepim/kleopatra/main.cpp +++ b/kdepim/kleopatra/main.cpp @@ -68,10 +68,6 @@ namespace Kleo { #include -#ifdef KDEPIM_MOBILE_UI -# include -#endif - #include #include #include @@ -207,19 +203,11 @@ int main( int argc, char** argv ) AboutData aboutData; KCmdLineArgs::init(argc, argv, &aboutData); - -#ifdef KDEPIM_MOBILE_UI - KDeclarativeApplicationBase::preApplicationSetup( KleopatraApplication::commandLineOptions() ); -#else KCmdLineArgs::addCmdLineOptions( KleopatraApplication::commandLineOptions() ); -#endif kDebug() << "Statup timing:" << timer.elapsed() << "ms elapsed: Command line args created"; KleopatraApplication app; -#ifdef KDEPIM_MOBILE_UI - KDeclarativeApplicationBase::postApplicationSetup(); -#endif kDebug() << "Startup timing:" << timer.elapsed() << "ms elapsed: Application created"; diff --git a/kdepim/kleopatra/mainwindow_desktop.cpp b/kdepim/kleopatra/mainwindow.cpp similarity index 98% rename from kdepim/kleopatra/mainwindow_desktop.cpp rename to kdepim/kleopatra/mainwindow.cpp index ccbf3d9e..cbf941fc 100644 --- a/kdepim/kleopatra/mainwindow_desktop.cpp +++ b/kdepim/kleopatra/mainwindow.cpp @@ -32,7 +32,7 @@ #include -#include "mainwindow_desktop.h" +#include "mainwindow.h" #include "aboutdata.h" #include "models/keylistmodel.h" @@ -94,12 +94,6 @@ #include -#ifdef Q_OS_WIN32 -static const bool OS_WIN = true; -#else -static const bool OS_WIN = false; -#endif - using namespace Kleo; using namespace Kleo::Commands; using namespace boost; @@ -319,10 +313,8 @@ void MainWindow::Private::setupActions() { const action_data action_data[] = { // most have been MOVED TO keylistcontroller.cpp // Tools menu -#ifndef Q_OS_WIN { "tools_start_kwatchgnupg", i18n("GnuPG Log Viewer"), QString(), "kwatchgnupg", q, SLOT(gnupgLogViewer()), QString(), false, true }, -#endif #if 0 { "tools_start_kgpgconf", i18n("GnuPG Administrative Console"), QString(), "kgpgconf", q, SLOT(gnupgLogViewer()), QString(), false, true }, @@ -335,11 +327,6 @@ void MainWindow::Private::setupActions() { // Settings menu { "settings_self_test", i18n("Perform Self-Test"), QString(), 0, q, SLOT(selfTest()), QString(), false, true }, - // Help menu -#ifdef Q_WS_WIN - { "help_about_gpg4win", i18n("About Gpg4win"), QString(), - "gpg4win-compact", q, SLOT(aboutGpg4Win()), QString(), false, true }, -#endif // most have been MOVED TO keylistcontroller.cpp }; @@ -565,4 +552,4 @@ void MainWindow::saveProperties( KConfigGroup & cg ) } } -#include "moc_mainwindow_desktop.cpp" +#include "moc_mainwindow.cpp" diff --git a/kdepim/kleopatra/mainwindow.h b/kdepim/kleopatra/mainwindow.h index 6621686d..56419b59 100644 --- a/kdepim/kleopatra/mainwindow.h +++ b/kdepim/kleopatra/mainwindow.h @@ -1,8 +1,8 @@ /* -*- mode: c++; c-basic-offset:4 -*- - mainwindow.h + mainwindow_desktop.h This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2010 Klarälvdalens Datakonsult AB + Copyright (c) 2007 Klarälvdalens Datakonsult AB Kleopatra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,13 +30,48 @@ your version. */ -#ifndef __KLEOPATRA_MAINWINDOW_H__ -#define __KLEOPATRA_MAINWINDOW_H__ +#ifndef __KLEOPATRA_MAINWINDOW_DESKTOP_H__ +#define __KLEOPATRA_MAINWINDOW_DESKTOP_H__ -#ifdef KDEPIM_MOBILE_UI -# include "mainwindow_mobile.h" -#else -# include "mainwindow_desktop.h" -#endif +#include -#endif /* __KLEOPATRA_MAINWINDOW_H__ */ +#include + +class MainWindow : public KXmlGuiWindow { + Q_OBJECT +public: + explicit MainWindow( QWidget * parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS ); + ~MainWindow(); + +public Q_SLOTS: + void importCertificatesFromFile( const QStringList & files ); + +protected: + QByteArray savedGeometry; + + void closeEvent( QCloseEvent * e ); + void showEvent( QShowEvent * e ); + void hideEvent( QHideEvent * e ); + void dragEnterEvent( QDragEnterEvent * ); + void dropEvent( QDropEvent * ); + void readProperties( const KConfigGroup & cg ); + void saveProperties( KConfigGroup & cg ); + +private: + class Private; + kdtools::pimpl_ptr d; + Q_PRIVATE_SLOT( d, void closeAndQuit() ) + Q_PRIVATE_SLOT( d, void selfTest() ) + Q_PRIVATE_SLOT( d, void configureBackend() ) + Q_PRIVATE_SLOT( d, void configureToolbars() ) + Q_PRIVATE_SLOT( d, void editKeybindings() ) + Q_PRIVATE_SLOT( d, void gnupgLogViewer() ) + Q_PRIVATE_SLOT( d, void gnupgAdministrativeConsole() ) + Q_PRIVATE_SLOT( d, void slotConfigCommitted() ) + Q_PRIVATE_SLOT( d, void slotContextMenuRequested(QAbstractItemView*,QPoint) ) + Q_PRIVATE_SLOT( d, void aboutGpg4Win() ) + Q_PRIVATE_SLOT( d, void slotFocusQuickSearch() ) +}; + + +#endif /* __KLEOPATRA_MAINWINDOW_DESKTOP_H__ */ diff --git a/kdepim/kleopatra/mainwindow_desktop.h b/kdepim/kleopatra/mainwindow_desktop.h deleted file mode 100644 index 56419b59..00000000 --- a/kdepim/kleopatra/mainwindow_desktop.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- mode: c++; c-basic-offset:4 -*- - mainwindow_desktop.h - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2007 Klarälvdalens Datakonsult AB - - Kleopatra is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Kleopatra is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - In addition, as a special exception, the copyright holders give - permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked - combinations including the two. You must obey the GNU General - Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to - your version of the file, but you are not obligated to do so. If - you do not wish to do so, delete this exception statement from - your version. -*/ - -#ifndef __KLEOPATRA_MAINWINDOW_DESKTOP_H__ -#define __KLEOPATRA_MAINWINDOW_DESKTOP_H__ - -#include - -#include - -class MainWindow : public KXmlGuiWindow { - Q_OBJECT -public: - explicit MainWindow( QWidget * parent=0, Qt::WindowFlags f=KDE_DEFAULT_WINDOWFLAGS ); - ~MainWindow(); - -public Q_SLOTS: - void importCertificatesFromFile( const QStringList & files ); - -protected: - QByteArray savedGeometry; - - void closeEvent( QCloseEvent * e ); - void showEvent( QShowEvent * e ); - void hideEvent( QHideEvent * e ); - void dragEnterEvent( QDragEnterEvent * ); - void dropEvent( QDropEvent * ); - void readProperties( const KConfigGroup & cg ); - void saveProperties( KConfigGroup & cg ); - -private: - class Private; - kdtools::pimpl_ptr d; - Q_PRIVATE_SLOT( d, void closeAndQuit() ) - Q_PRIVATE_SLOT( d, void selfTest() ) - Q_PRIVATE_SLOT( d, void configureBackend() ) - Q_PRIVATE_SLOT( d, void configureToolbars() ) - Q_PRIVATE_SLOT( d, void editKeybindings() ) - Q_PRIVATE_SLOT( d, void gnupgLogViewer() ) - Q_PRIVATE_SLOT( d, void gnupgAdministrativeConsole() ) - Q_PRIVATE_SLOT( d, void slotConfigCommitted() ) - Q_PRIVATE_SLOT( d, void slotContextMenuRequested(QAbstractItemView*,QPoint) ) - Q_PRIVATE_SLOT( d, void aboutGpg4Win() ) - Q_PRIVATE_SLOT( d, void slotFocusQuickSearch() ) -}; - - -#endif /* __KLEOPATRA_MAINWINDOW_DESKTOP_H__ */ diff --git a/kdepim/kleopatra/selftest/uiservercheck.cpp b/kdepim/kleopatra/selftest/uiservercheck.cpp index b8827d9b..cbb41d3b 100644 --- a/kdepim/kleopatra/selftest/uiservercheck.cpp +++ b/kdepim/kleopatra/selftest/uiservercheck.cpp @@ -38,7 +38,7 @@ #include -#include +#include #include // for Qt::escape #include diff --git a/kdepim/kresources/CMakeLists.txt b/kdepim/kresources/CMakeLists.txt index 7bf19399..a5ccbf7a 100644 --- a/kdepim/kresources/CMakeLists.txt +++ b/kdepim/kresources/CMakeLists.txt @@ -10,26 +10,6 @@ add_definitions( -DKCAL_DEPRECATED_EXPORT=KCAL_EXPORT ) -# taken from Akonadi which took it from FindQt4.cmake to add additional includes, should probably be merged back there -MACRO(QT4_ADD_DBUS_INTERFACE2 _sources _interface _basename _include) - GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE) - SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) - SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) - SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) - SET(_params -m -i ${_include} -p) - - ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} - COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} ${_basename} ${_infile} - DEPENDS ${_infile}) - - SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) - - QT4_GENERATE_MOC(${_header} ${_moc}) - - SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) - MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) -ENDMACRO(QT4_ADD_DBUS_INTERFACE2) - include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) add_subdirectory( blog )