diff --git a/kdepim/akonadiconsole/browserwidget.cpp b/kdepim/akonadiconsole/browserwidget.cpp index 416b9f30..5b551dc9 100644 --- a/kdepim/akonadiconsole/browserwidget.cpp +++ b/kdepim/akonadiconsole/browserwidget.cpp @@ -52,6 +52,7 @@ #include #include +#include #include #include #include diff --git a/kdepim/akonadiconsole/collectionaclpage.cpp b/kdepim/akonadiconsole/collectionaclpage.cpp index f667ba17..16b7d24b 100644 --- a/kdepim/akonadiconsole/collectionaclpage.cpp +++ b/kdepim/akonadiconsole/collectionaclpage.cpp @@ -21,6 +21,8 @@ #include +#include + using namespace Akonadi; CollectionAclPage::CollectionAclPage(QWidget * parent) : diff --git a/kdepim/akonadiconsole/collectioninternalspage.cpp b/kdepim/akonadiconsole/collectioninternalspage.cpp index f0e22471..9508fc25 100644 --- a/kdepim/akonadiconsole/collectioninternalspage.cpp +++ b/kdepim/akonadiconsole/collectioninternalspage.cpp @@ -21,6 +21,8 @@ #include +#include + using namespace Akonadi; CollectionInternalsPage::CollectionInternalsPage(QWidget * parent) : diff --git a/kdepim/akonadiconsole/dbconsole.cpp b/kdepim/akonadiconsole/dbconsole.cpp index fea1af8a..e9f8b845 100644 --- a/kdepim/akonadiconsole/dbconsole.cpp +++ b/kdepim/akonadiconsole/dbconsole.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/kdepim/akonadiconsole/instanceselector.cpp b/kdepim/akonadiconsole/instanceselector.cpp index 4503d027..b37b7e6e 100644 --- a/kdepim/akonadiconsole/instanceselector.cpp +++ b/kdepim/akonadiconsole/instanceselector.cpp @@ -23,6 +23,7 @@ #include "ui_instanceselector.h" #include +#include #include diff --git a/kdepim/incidenceeditor-ng/incidencedescription.cpp b/kdepim/incidenceeditor-ng/incidencedescription.cpp index 0a76a0ba..5f715249 100644 --- a/kdepim/incidenceeditor-ng/incidencedescription.cpp +++ b/kdepim/incidenceeditor-ng/incidencedescription.cpp @@ -19,12 +19,9 @@ */ #include "incidencedescription.h" -#ifdef KDEPIM_MOBILE_UI -#include "ui_dialogmoremobile.h" -#else #include "ui_dialogdesktop.h" -#endif +#include #include #include #include @@ -46,11 +43,7 @@ class IncidenceDescriptionPrivate } -#ifdef KDEPIM_MOBILE_UI -IncidenceDescription::IncidenceDescription( Ui::EventOrTodoMore *ui ) -#else IncidenceDescription::IncidenceDescription( Ui::EventOrTodoDesktop *ui ) -#endif : IncidenceEditor( 0 ), mUi( ui ), d( new IncidenceDescriptionPrivate() ) { setObjectName( "IncidenceDescription" ); @@ -63,13 +56,9 @@ IncidenceDescription::IncidenceDescription( Ui::EventOrTodoDesktop *ui ) KRichTextWidget::SupportAlignment | KRichTextWidget::SupportFormatPainting ); mUi->mRichTextLabel->setContextMenuPolicy(Qt::NoContextMenu); -#ifdef KDEPIM_MOBILE_UI - mUi->mRichTextLabel->hide(); -#else setupToolBar(); connect( mUi->mRichTextLabel, SIGNAL(linkActivated(QString)), this, SLOT(toggleRichTextDescription()) ); -#endif connect( mUi->mDescriptionEdit, SIGNAL(textChanged()), this, SLOT(checkDirtyStatus()) ); } diff --git a/kdepim/incidenceeditor-ng/incidencedescription.h b/kdepim/incidenceeditor-ng/incidencedescription.h index 7f592891..84061bef 100644 --- a/kdepim/incidenceeditor-ng/incidencedescription.h +++ b/kdepim/incidenceeditor-ng/incidencedescription.h @@ -40,11 +40,7 @@ class INCIDENCEEDITORS_NG_EXPORT IncidenceDescription : public IncidenceEditor { Q_OBJECT public: -#ifdef KDEPIM_MOBILE_UI - explicit IncidenceDescription( Ui::EventOrTodoMore *ui ); -#else explicit IncidenceDescription( Ui::EventOrTodoDesktop *ui ); -#endif ~IncidenceDescription(); @@ -65,11 +61,7 @@ class INCIDENCEEDITORS_NG_EXPORT IncidenceDescription : public IncidenceEditor void setupToolBar(); private: -#ifdef KDEPIM_MOBILE_UI - Ui::EventOrTodoMore *mUi; -#else Ui::EventOrTodoDesktop *mUi; -#endif //@cond PRIVATE Q_DECLARE_PRIVATE( IncidenceDescription ) IncidenceDescriptionPrivate * const d; diff --git a/kdepim/kaddressbook/printing/compact/compactstyle.cpp b/kdepim/kaddressbook/printing/compact/compactstyle.cpp index 713454b7..84414ea1 100644 --- a/kdepim/kaddressbook/printing/compact/compactstyle.cpp +++ b/kdepim/kaddressbook/printing/compact/compactstyle.cpp @@ -30,6 +30,7 @@ #include +#include #include #include diff --git a/kdepim/kaddressbook/printing/detailled/detailledstyle.cpp b/kdepim/kaddressbook/printing/detailled/detailledstyle.cpp index 7a5babae..ab85a7f4 100644 --- a/kdepim/kaddressbook/printing/detailled/detailledstyle.cpp +++ b/kdepim/kaddressbook/printing/detailled/detailledstyle.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include diff --git a/kdepim/kaddressbook/printing/ringbinder/ringbinderstyle.cpp b/kdepim/kaddressbook/printing/ringbinder/ringbinderstyle.cpp index d966ad30..22c38a39 100644 --- a/kdepim/kaddressbook/printing/ringbinder/ringbinderstyle.cpp +++ b/kdepim/kaddressbook/printing/ringbinder/ringbinderstyle.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/kdepim/kalarm/functions.cpp b/kdepim/kalarm/functions.cpp index 049d2f5e..f53bcdcd 100644 --- a/kdepim/kalarm/functions.cpp +++ b/kdepim/kalarm/functions.cpp @@ -1856,7 +1856,7 @@ void Private::windowAdded(WId w) #ifdef Q_WS_X11 static const int SUPPORTED_TYPES = NET::NormalMask | NET::DesktopMask | NET::DockMask | NET::ToolbarMask | NET::MenuMask | NET::DialogMask - | NET::OverrideMask | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; + | NET::TopMenuMask | NET::UtilityMask | NET::SplashMask; KWindowInfo kwinfo = KWindowSystem::windowInfo(w, NET::WMWindowType | NET::WMName); if (kwinfo.windowType(SUPPORTED_TYPES) == NET::TopMenu || kwinfo.windowType(SUPPORTED_TYPES) == NET::Toolbar diff --git a/kdepim/kalarm/messagewin.cpp b/kdepim/kalarm/messagewin.cpp index fe27a629..3c943817 100644 --- a/kdepim/kalarm/messagewin.cpp +++ b/kdepim/kalarm/messagewin.cpp @@ -2538,7 +2538,7 @@ FullScreenType haveFullScreenWindow(int screen) const NETRootInfo rootInfo(display, NET::ClientList | NET::ActiveWindow, screen); const Window rootWindow = rootInfo.rootWindow(); const Window activeWindow = rootInfo.activeWindow(); - const Window* windows = rootInfo.clientList(); + const xcb_window_t* windows = rootInfo.clientList(); const int windowCount = rootInfo.clientListCount(); kDebug()<<"Screen"< #include #include diff --git a/kdepim/kleopatra/mainwindow_mobile.cpp b/kdepim/kleopatra/mainwindow_mobile.cpp deleted file mode 100644 index 8709c158..00000000 --- a/kdepim/kleopatra/mainwindow_mobile.cpp +++ /dev/null @@ -1,391 +0,0 @@ -/* -*- mode: c++; c-basic-offset:4 -*- - mainwindow_mobile.cpp - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2010 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. -*/ - -#include - -#include "mainwindow_mobile.h" - -#include "aboutdata.h" - -#include "models/keylistmodel.h" -#include "models/keylistsortfilterproxymodel.h" - -#include "view/searchbar.h" -#if 0 -#include "view/tabwidget.h" -#endif -#include "view/keytreeview.h" -#include "view/keylistcontroller.h" - -#include "commands/selftestcommand.h" -#include "commands/importcrlcommand.h" -#include "commands/importcertificatefromfilecommand.h" -#include "commands/decryptverifyfilescommand.h" -#include "commands/signencryptfilescommand.h" - -#include "utils/detail_p.h" -#include "utils/gnupg-helper.h" -#include "utils/action_data.h" -#include "utils/classify.h" -#include "utils/filedialog.h" - -// from libkdepim -#include "progresswidget/statusbarprogresswidget.h" -#include "progresswidget/progressdialog.h" - -// from mobileui -#include "declarativewidgetbase.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#if 0 -#include -#endif -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#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; -using namespace GpgME; - -namespace { - - static const KAboutData * aboutGpg4WinData() { - static const AboutGpg4WinData data; - return &data; - } - -} - -class MainWindow::KeyTreeViewItem : public DeclarativeWidgetBase { - Q_OBJECT -public: - explicit KeyTreeViewItem( QGraphicsItem * parent=0 ) - : DeclarativeWidgetBase( parent ) {} - ~KeyTreeViewItem() {} -}; - -class MainWindow::SearchBarItem : public DeclarativeWidgetBase { - Q_OBJECT -public: - explicit SearchBarItem( QGraphicsItem * parent=0 ) - : DeclarativeWidgetBase( parent ) {} - ~SearchBarItem() {} -}; - -static KGuiItem KStandardGuiItem_quit() { - static const QString app = KGlobal::mainComponent().aboutData()->programName(); - KGuiItem item = KStandardGuiItem::quit(); - item.setText( i18nc( "Quit [ApplicationName]", "&Quit %1", app ) ); - return item; -} - -static KGuiItem KStandardGuiItem_close() { - KGuiItem item = KStandardGuiItem::close(); - item.setText( i18n("Only &Close Window" ) ); - return item; -} - -class MainWindow::Private { - friend class ::MainWindow; - MainWindow * const q; - -public: - explicit Private( MainWindow * qq ); - ~Private(); - - void start( Command * c ) { - c->setParentWidget( q ); - c->start(); - } - - template - void createAndStart() { - this->start( new T( this->currentView(), &this->controller ) ); - } - template - void createAndStart( QAbstractItemView * view ) { - start( new T( view, &this->controller ) ); - } - template - void createAndStart( const QStringList & a ) { - start( new T( a, this->currentView(), &this->controller ) ); - } - template - void createAndStart( const QStringList & a, QAbstractItemView * view ) { - start( new T( a, view, &this->controller ) ); - } - - void closeAndQuit() { - qApp->quit(); - } - - void selfTest() { - createAndStart(); - } - void configureBackend(); - void showHandbook(); - - void gnupgLogViewer() { - if( !QProcess::startDetached( QLatin1String( "kwatchgnupg" ) ) ) - KMessageBox::error( q, i18n( "Could not start the GnuPG Log Viewer (kwatchgnupg). " - "Please check your installation." ), - i18n( "Error Starting KWatchGnuPG" ) ); - } - - void gnupgAdministrativeConsole() { - if( !QProcess::startDetached( QLatin1String( "kgpgconf" ) ) ) - KMessageBox::error( q, i18n( "Could not start the GnuPG Administrative Console (kgpgconf). " - "Please check your installation." ), - i18n( "Error Starting KGpgConf" ) ); - } - - void slotConfigCommitted(); - void slotSearchBarTextChanged( const QString & ); - - void aboutGpg4Win() { - ( new KAboutApplicationDialog( aboutGpg4WinData(), KAboutApplicationDialog::HideKdeVersion|KAboutApplicationDialog::HideTranslators, q ) )->show(); - } - -private: - void setupActions(); - void tryToConnectSearchBarToKeyTreeView() { - if ( searchBar && keyTreeView ) - keyTreeView->connectSearchBar( searchBar ); - } - - QAbstractItemView * currentView() const { - return controller.currentView(); - } - -private: - QPointer searchBar; - QPointer keyTreeView; - Kleo::KeyListController controller; - bool firstShow : 1; -}; - -MainWindow::Private::Private( MainWindow * qq ) - : q( qq ), - searchBar(), - keyTreeView(), - controller( q ), - firstShow( true ) -{ - KDAB_SET_OBJECT_NAME( controller ); - - AbstractKeyListModel * flatModel = AbstractKeyListModel::createFlatKeyListModel( q ); - AbstractKeyListModel * hierarchicalModel = AbstractKeyListModel::createHierarchicalKeyListModel( q ); - - KDAB_SET_OBJECT_NAME( flatModel ); - KDAB_SET_OBJECT_NAME( hierarchicalModel ); - - - controller.setFlatModel( flatModel ); - controller.setHierarchicalModel( hierarchicalModel ); - controller.setParentWidget( q ); - -} - -MainWindow::Private::~Private() {} - -MainWindow::MainWindow( QWidget * parent ) - : KDeclarativeFullScreenView( QLatin1String("kleopatra-mobile"), parent ), d( new Private( this ) ) -{ -} - -MainWindow::~MainWindow() {} - - -void MainWindow::Private::setupActions() { - - KActionCollection * const coll = q->actionCollection(); - - const action_data action_data[] = { - // Settings menu - { "settings_self_test", i18n("Perform Self-Test"), QString(), - 0, q, SLOT(selfTest()), QString(), false, true }, - }; - - make_actions_from_data( action_data, coll ); - - KStandardAction::close( q, SLOT(close()), coll ); - KStandardAction::quit( q, SLOT(closeAndQuit()), coll ); - KStandardAction::preferences( qApp, SLOT(openOrRaiseConfigDialog()), coll ); - - controller.createActions( coll ); -} - -void MainWindow::doDelayedInit() { - qmlRegisterType( "org.kde.kleopatra", 2, 1, "KeyTreeView" ); - qmlRegisterType ( "org.kde.kleopatra", 2, 1, "SearchBar" ); - d->setupActions(); - engine()->rootContext()->setContextProperty( QLatin1String( "application" ), QVariant::fromValue( static_cast( this ) ) ); -} - -void MainWindow::registerKeyTreeView( KeyTreeView * view ) { - if ( !view ) - return; - view->setFlatModel( d->controller.flatModel() ); - view->setHierarchicalModel( d->controller.hierarchicalModel() ); - QTreeView * const v = view->view(); - v->setItemsExpandable( false ); - v->header()->setResizeMode( QHeaderView::Stretch ); - v->header()->hide(); - d->controller.addView( v ); - d->controller.setCurrentView( v ); - d->keyTreeView = view; - d->tryToConnectSearchBarToKeyTreeView(); - - connect( v->model(), SIGNAL(rowsInserted(QModelIndex,int,int)), - SIGNAL(certificatesAvailabilityChanged()) ); - connect( v->model(), SIGNAL(rowsRemoved(QModelIndex,int,int)), - SIGNAL(certificatesAvailabilityChanged()) ); - connect( v->model(), SIGNAL(modelReset()), - SIGNAL(certificatesAvailabilityChanged()) ); - - emit certificatesAvailabilityChanged(); -} - -void MainWindow::registerSearchBar( SearchBar * bar ) { - if ( !bar ) - return; - d->searchBar = bar; - bar->setFixedHeight( 0 ); - connect( bar, SIGNAL(stringFilterChanged(QString)), - this, SLOT(slotSearchBarTextChanged(QString)) ); - d->tryToConnectSearchBarToKeyTreeView(); -} - -void MainWindow::Private::slotConfigCommitted() { - controller.updateConfig(); -} - -void MainWindow::closeEvent( QCloseEvent * e ) { - - d->closeAndQuit(); - - // KMainWindow::closeEvent() insists on quitting the application, - // so do not let it touch the event... - kDebug(); - if ( d->controller.hasRunningCommands() ) { - if ( d->controller.shutdownWarningRequired() ) { - const int ret = KMessageBox::warningContinueCancel( this, i18n("There are still some background operations ongoing. " - "These will be terminated when closing the window. " - "Proceed?"), - i18n("Ongoing Background Tasks") ); - if ( ret != KMessageBox::Continue ) { - e->ignore(); - return; - } - } - d->controller.cancelCommands(); - if ( d->controller.hasRunningCommands() ) { - // wait for them to be finished: - setEnabled( false ); - QEventLoop ev; - QTimer::singleShot( 100, &ev, SLOT(quit()) ); - connect( &d->controller, SIGNAL(commandsExecuting(bool)), &ev, SLOT(quit()) ); - ev.exec(); - kWarning( d->controller.hasRunningCommands() ) - << "controller still has commands running, this may crash now..."; - setEnabled( true ); - } - } - e->accept(); -} - -void MainWindow::keyPressEvent( QKeyEvent * e ) { - static bool isSendingEvent = false; - - if ( !isSendingEvent && d->searchBar && !e->text().isEmpty() ) { - const struct guard { guard() { isSendingEvent = true; } ~guard() { isSendingEvent = false; } } guard; - QCoreApplication::sendEvent( d->searchBar->lineEdit(), e ); - } else { - KDeclarativeFullScreenView::keyPressEvent( e ); - } -} - -void MainWindow::importCertificatesFromFile( const QStringList & files ) { - if ( !files.empty() ) - d->createAndStart( files ); -} - -void MainWindow::Private::slotSearchBarTextChanged( const QString & text ) { - if ( text.isEmpty() && searchBar && searchBar->isVisible() ) { - searchBar->setFixedHeight( 0 ); - searchBar->hide(); - } else if ( !text.isEmpty() && searchBar && !searchBar->isVisible() ) { - searchBar->setFixedHeight( searchBar->minimumSizeHint().height() ); - searchBar->show(); - searchBar->setFocus(); - } -} - -bool MainWindow::certificatesAvailable() const { - return (d->keyTreeView && d->keyTreeView->view()->model()->rowCount()); -} - -#include "moc_mainwindow_mobile.cpp" -#include "mainwindow_mobile.moc" diff --git a/kdepim/kleopatra/mainwindow_mobile.h b/kdepim/kleopatra/mainwindow_mobile.h deleted file mode 100644 index 7fe69c4f..00000000 --- a/kdepim/kleopatra/mainwindow_mobile.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- mode: c++; c-basic-offset:4 -*- - mainwindow_mobile.h - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2010 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_MOBILE_H__ -#define __KLEOPATRA_MAINWINDOW_MOBILE_H__ - -#include - -#include - -namespace Kleo { - class KeyTreeView; - class SearchBar; -} - -class QStringList; - -class MainWindow : public KDeclarativeFullScreenView { - Q_OBJECT - Q_PROPERTY( bool certificatesAvailable READ certificatesAvailable NOTIFY certificatesAvailabilityChanged ) -public: - explicit MainWindow( QWidget * parent=0 ); - ~MainWindow(); - - bool certificatesAvailable() const; - -public Q_SLOTS: - void importCertificatesFromFile( const QStringList & files ); - -Q_SIGNALS: - void certificatesAvailabilityChanged(); - -protected: - /* reimp */ void doDelayedInit(); - /* reimp */ void closeEvent( QCloseEvent * ); - /* reimp */ void keyPressEvent( QKeyEvent * ); - -private: - void registerKeyTreeView( Kleo::KeyTreeView * view ); - void registerSearchBar( Kleo::SearchBar * bar ); - -private: - Q_PRIVATE_SLOT( d, void closeAndQuit() ) - Q_PRIVATE_SLOT( d, void selfTest() ) - Q_PRIVATE_SLOT( d, void slotSearchBarTextChanged(QString) ) - Q_PRIVATE_SLOT( d, void slotConfigCommitted() ) - class KeyTreeViewItem; - class SearchBarItem; - class Private; - kdtools::pimpl_ptr d; -}; - -#endif /* __KLEOPATRA_MAINWINDOW_MOBILE_H__ */ diff --git a/kdepim/kleopatra/qml/KleopatraActions.qml b/kdepim/kleopatra/qml/KleopatraActions.qml deleted file mode 100644 index e33f527a..00000000 --- a/kdepim/kleopatra/qml/KleopatraActions.qml +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- mode: javascript; c-basic-offset:2 -*- - KleopatraActions.qml - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2010 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. -*/ - -import Qt 4.7 as QML -import org.kde 4.5 -import org.kde.pim.mobileui 4.5 - -ActionMenuContainer { - - menuStyle : true - - actionItemHeight : height / 7 - actionItemSpacing - actionItemWidth : 200 - actionItemSpacing : 2 - - ActionList { - category : "home" - name : "file_menu" - text : KDE.i18n( "File" ) - ActionListItem { name : "file_new_certificate" } - ActionListItem { name : "file_lookup_certificates" } - ActionListItem { name : "file_import_certificates" } - ActionListItem { name : "file_export_certificates" } - ActionListItem { name : "file_export_secret_keys" } - /* ActionListItem { name : "file_export_certificates_to_server" } */ - ActionListItem { name : "file_quit" } - } - - ActionList { - category : "home" - name : "view_menu" - text : KDE.i18n( "View" ) - ActionListItem { name : "view_redisplay" } - ActionListItem { name : "view_stop_operations" } - ActionListItem { name : "view_certificate_details" } - } - - ActionList { - category : "home" - name : "cert_menu" - text : KDE.i18n( "Certificates" ) - ActionListItem { name : "certificates_change_owner_trust" } - ActionListItem { name : "certificates_trust_root" } - ActionListItem { name : "certificates_distrust_root" } - ActionListItem { name : "certificates_certify_certificate" } - ActionListItem { name : "certificates_change_expiry" } - ActionListItem { name : "certificates_change_passphrase" } - ActionListItem { name : "certificates_delete" } - ActionListItem { name : "certificates_dump_certificate" } - } - - /*ActionList { - category : "home" - name : "tools_menu" - text : KDE.i18n( "Tools" ) - ActionListItem { name : "tools_refresh_openpgp_certificates" } - ActionListItem { name : "tools_refresh_x509_certificates" } - ActionListItem { name : "crl_import_crl" } - ActionListItem { name : "crl_clear_crl_cache" } - ActionListItem { name : "crl_dump_crl_cache" } - }*/ - - ActionList { - category : "home" - name : "settings_menu" - text : KDE.i18n( "Settings" ) - ActionListItem { name : "settings_self_test" } - ActionListItem { name : "options_configure" } - } - -/* - ActionList { - category : "home" - name : "help_menu" - text : KDE.i18n( "Help" ) - ActionListItem { name : "help_about_kleopatra" } - } -*/ - -} diff --git a/kdepim/kleopatra/qml/kleopatra-mobile.qml b/kdepim/kleopatra/qml/kleopatra-mobile.qml deleted file mode 100644 index bf0c057e..00000000 --- a/kdepim/kleopatra/qml/kleopatra-mobile.qml +++ /dev/null @@ -1,140 +0,0 @@ -/* -*- mode: javascript; c-basic-offset:2 -*- - kleopatra-mobile.qml - - This file is part of Kleopatra, the KDE keymanager - Copyright (c) 2010 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. -*/ - -import Qt 4.7 as QML -import org.kde 4.5 -import org.kde.pim.mobileui 4.5 as KPIM -import org.kde.kleopatra 2.1 as Kleo - -KPIM.MainView { - id: kleopatraMobile; - - QML.Rectangle { - - anchors.fill : parent - - Kleo.KeyTreeView { - id : keyTreeView - - anchors.top : parent.top - anchors.topMargin : 35 - anchors.bottom : searchBar.top - anchors.left : parent.left - anchors.leftMargin : 30 - anchors.right : parent.right - } - - Kleo.SearchBar { - id : searchBar - - anchors.bottom : parent.bottom - anchors.left : parent.left - anchors.right : parent.right - - visible : false - height : 0 - y : height == 0 ? parent.height : parent.height - height - } - - QML.Rectangle { - anchors.fill : parent - visible : !application.certificatesAvailable - - QML.Text { - text : KDE.i18n( "No certificates loaded yet." ); - anchors.centerIn : parent - } - } - } - - SlideoutPanelContainer { - anchors.fill: parent - - SlideoutPanel { - id: actionPanel - titleText: KDE.i18n( "Actions" ) - handlePosition : 125 - handleHeight: 150 - anchors.fill : parent - - content : [ - KleopatraActions { - id : kleopatraActions - anchors.fill : parent - -/* - scriptActions : [ - KPIM.ScriptAction { - name : "show_about_dialog" - script : { - actionPanel.collapse(); - aboutDialog.visible = true; - } - }, - KPIM.ScriptAction { - name : "configure" - script : { - actionPanel.collapse(); - configDialog.visible = true; - } - }, - KPIM.ScriptAction { - name : "to_selection_screen" - script : { - actionPanel.collapse(); - guiStateManager.pushState( KPIM.GuiStateManager.MultipleFolderSelectionScreenState ); - } - }, - KPIM.ScriptAction { - name : "add_as_favorite" - script : { - actionPanel.collapse(); - application.saveFavorite(); - } - }, - KPIM.ScriptAction { - name : "start_maintenance" - script : { - actionPanel.collapse(); - guiStateManager.pushState( KPIM.GuiStateManager.BulkActionScreenState ); - } - } - ] -*/ - - onDoCollapse : actionPanel.collapse(); - } - ] - } - } - -} diff --git a/kdepim/knotes/CMakeLists.txt b/kdepim/knotes/CMakeLists.txt index 6d1b9398..eb1f524f 100644 --- a/kdepim/knotes/CMakeLists.txt +++ b/kdepim/knotes/CMakeLists.txt @@ -5,6 +5,10 @@ if(ENABLE_TESTING) endif() add_definitions( -DQT_NO_CAST_FROM_ASCII ) add_definitions( -DQT_NO_CAST_TO_ASCII ) +if(BALOO_FOUND) + add_definitions(-DHAVE_BALOO) +endif() + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") include_directories( diff --git a/kdepim/knotes/finddialog/knotefinddialog.cpp b/kdepim/knotes/finddialog/knotefinddialog.cpp index 5bd711e3..4ab1dec8 100644 --- a/kdepim/knotes/finddialog/knotefinddialog.cpp +++ b/kdepim/knotes/finddialog/knotefinddialog.cpp @@ -18,8 +18,10 @@ #include "knotefinddialog.h" #include "noteshared/widget/notelistwidget.h" +#ifdef HAVE_BALOO #include "baloo/pim/notequery.h" #include +#endif #include #include @@ -126,15 +128,17 @@ void KNoteFindWidget::slotSearchNote() query.matchNote(searchStr); query.matchTitle(searchStr); - Baloo::PIM::ResultIterator it = query.exec(); - Akonadi::Item::List lst; +#ifdef HAVE_BALOO + Baloo::PIM::ResultIterator it = query.exec(); while (it.next()) { const Akonadi::Item::Id id = it.id(); if (mNotes.contains(id)) { lst << mNotes.value(id); } } +#endif + mNoteList->setNotes(lst); if (lst.isEmpty()) { mResultSearch->setText(i18n("No Result found.")); diff --git a/kdepim/korganizer/publishdialog.cpp b/kdepim/korganizer/publishdialog.cpp index 670ef9c4..cd4edb6a 100644 --- a/kdepim/korganizer/publishdialog.cpp +++ b/kdepim/korganizer/publishdialog.cpp @@ -33,6 +33,7 @@ #include #include +#include #include PublishDialog::PublishDialog( QWidget *parent ) diff --git a/kdepim/mailimporter/selectthunderbirdprofilewidget.cpp b/kdepim/mailimporter/selectthunderbirdprofilewidget.cpp index 670b86ea..573d1aed 100644 --- a/kdepim/mailimporter/selectthunderbirdprofilewidget.cpp +++ b/kdepim/mailimporter/selectthunderbirdprofilewidget.cpp @@ -18,6 +18,8 @@ #include "selectthunderbirdprofilewidget.h" #include "ui_selectthunderbirdprofilewidget.h" +#include + #include SelectThunderbirdProfileDialog::SelectThunderbirdProfileDialog(QWidget *parent) diff --git a/kdepim/messagelist/CMakeLists.txt b/kdepim/messagelist/CMakeLists.txt index 3588bbba..7631dacf 100644 --- a/kdepim/messagelist/CMakeLists.txt +++ b/kdepim/messagelist/CMakeLists.txt @@ -2,6 +2,9 @@ project(messagelist) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII") +if(BALOO_FOUND) + add_definitions(-DHAVE_BALOO) +endif() option(KDEPIM_FOLDEROPEN_PROFILE "Enable debug output for timing folder loading" FALSE) configure_file(config-messagelist.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-messagelist.h) diff --git a/kdepim/messagelist/core/filter.cpp b/kdepim/messagelist/core/filter.cpp index bff14b2d..c392dfce 100644 --- a/kdepim/messagelist/core/filter.cpp +++ b/kdepim/messagelist/core/filter.cpp @@ -21,8 +21,10 @@ #include "core/filter.h" #include "core/messageitem.h" +#ifdef HAVE_BALOO #include #include +#endif using namespace MessageList::Core; @@ -130,6 +132,7 @@ void Filter::setSearchString( const QString &search, QuickSearchLine::SearchOpti needToSplitString = true; } +#ifdef HAVE_BALOO Baloo::PIM::EmailQuery query; if (options & QuickSearchLine::SearchEveryWhere) { query.matches(newStr); @@ -156,6 +159,10 @@ void Filter::setSearchString( const QString &search, QuickSearchLine::SearchOpti while (it.next()) { mMatchingItemIds << it.id(); } +#else + Q_UNUSED(needToSplitString); +#endif + emit finished(); } diff --git a/kdepim/messageviewer/adblock/adblockcreatefilterdialog.cpp b/kdepim/messageviewer/adblock/adblockcreatefilterdialog.cpp index a639f3a5..4249e976 100644 --- a/kdepim/messageviewer/adblock/adblockcreatefilterdialog.cpp +++ b/kdepim/messageviewer/adblock/adblockcreatefilterdialog.cpp @@ -18,6 +18,9 @@ #include "adblockcreatefilterdialog.h" #include "ui_adblockcreatefilterwidget.h" +#include +#include + #include using namespace MessageViewer; diff --git a/kdepim/templateparser/templatesconfiguration.cpp b/kdepim/templateparser/templatesconfiguration.cpp index 58fcee73..55ebe1e2 100644 --- a/kdepim/templateparser/templatesconfiguration.cpp +++ b/kdepim/templateparser/templatesconfiguration.cpp @@ -22,6 +22,7 @@ #include "templatesconfiguration_kfg.h" #include "pimcommon/texteditor/richtexteditor/richtexteditor.h" +#include #include #include