From fcd20a2ec228b915c67acb76f1ab84ad92cdcd22 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Wed, 30 Apr 2014 22:06:39 +0200 Subject: [PATCH] Port++ --- blogilo/src/mainwindow.cpp | 16 ++++++++-------- blogilo/src/poststabwidget.cpp | 4 ++-- blogilo/src/toolbox.cpp | 12 ++++++------ importwizard/importwizard.cpp | 2 +- kleopatra/kgpgconf/CMakeLists.txt | 8 ++++---- libkdepim/addressline/addresseelineedit.cpp | 18 +++++++++--------- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/blogilo/src/mainwindow.cpp b/blogilo/src/mainwindow.cpp index 8c5ecd7574..96dad5a228 100644 --- a/blogilo/src/mainwindow.cpp +++ b/blogilo/src/mainwindow.cpp @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include #include #include @@ -66,7 +66,7 @@ #include #include #include -#include +#include #include #include @@ -211,24 +211,24 @@ void MainWindow::setupActions() KStandardAction::preferences( this, SLOT(optionsPreferences()), actionCollection() ); // custom menu and menu item - KAction *actNewPost = new KAction( QIcon::fromTheme( QLatin1String("document-new") ), i18n( "New Post" ), this ); + QAction *actNewPost = new QAction( QIcon::fromTheme( QLatin1String("document-new") ), i18n( "New Post" ), this ); actionCollection()->addAction( QLatin1String( "new_post" ), actNewPost ); actNewPost->setShortcut( Qt::CTRL + Qt::Key_N ); connect( actNewPost, SIGNAL(triggered(bool)), this, SLOT(slotCreateNewPost()) ); - KAction *actAddBlog = new KAction( QIcon::fromTheme( QLatin1String("list-add") ), i18n( "Add Blog..." ), this ); + QAction *actAddBlog = new QAction( QIcon::fromTheme( QLatin1String("list-add") ), i18n( "Add Blog..." ), this ); actionCollection()->addAction( QLatin1String( "add_blog" ), actAddBlog ); connect( actAddBlog, SIGNAL(triggered(bool)), this, SLOT(addBlog()) ); - KAction *actPublish = new KAction( QIcon::fromTheme( QLatin1String("arrow-up") ), i18n( "Submit..." ), this ); + QAction *actPublish = new QAction( QIcon::fromTheme( QLatin1String("arrow-up") ), i18n( "Submit..." ), this ); actionCollection()->addAction( QLatin1String( "publish_post" ), actPublish ); connect( actPublish, SIGNAL(triggered(bool)), this, SLOT(slotPublishPost()) ); - KAction *actUpload = new KAction( QIcon::fromTheme( QLatin1String("upload-media") ), i18n( "Upload Media..." ), this ); + QAction *actUpload = new QAction( QIcon::fromTheme( QLatin1String("upload-media") ), i18n( "Upload Media..." ), this ); actionCollection()->addAction( QLatin1String( "upload_media" ), actUpload ); connect( actUpload, SIGNAL(triggered(bool)), this, SLOT(uploadMediaObject()) ); - KAction *actSaveLocally = new KAction( QIcon::fromTheme( QLatin1String("document-save") ), i18n( "Save Locally" ), this ); + QAction *actSaveLocally = new QAction( QIcon::fromTheme( QLatin1String("document-save") ), i18n( "Save Locally" ), this ); actionCollection()->addAction( QLatin1String( "save_locally" ), actSaveLocally ); actSaveLocally->setShortcut( Qt::CTRL + Qt::Key_S ); connect( actSaveLocally, SIGNAL(triggered(bool)), this, SLOT(slotSavePostLocally()) ); @@ -244,7 +244,7 @@ void MainWindow::setupActions() blogs = new KSelectAction( this ); actionCollection()->addAction( QLatin1String( "blogs_list" ), blogs ); - KAction *actOpenBlog = new KAction(QIcon::fromTheme(QLatin1String("applications-internet")), i18n("Open in browser"), this); + QAction *actOpenBlog = new QAction(QIcon::fromTheme(QLatin1String("applications-internet")), i18n("Open in browser"), this); actionCollection()->addAction( QLatin1String("open_blog_in_browser"), actOpenBlog); actOpenBlog->setToolTip(i18n("Open current blog in browser")); connect( actOpenBlog, SIGNAL(triggered(bool)), this, SLOT(slotOpenCurrentBlogInBrowser()) ); diff --git a/blogilo/src/poststabwidget.cpp b/blogilo/src/poststabwidget.cpp index 65d6181137..7bd9f8ac66 100644 --- a/blogilo/src/poststabwidget.cpp +++ b/blogilo/src/poststabwidget.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include @@ -72,7 +72,7 @@ void PostsTabWidget::slotTabContextMenuRequest( const QPoint &pos ) if ( indexBar == -1 ) return; - KMenu menu( this ); + QMenu menu( this ); QAction *closeTab = menu.addAction( i18nc( "@action:inmenu", "Close Tab" ) ); closeTab->setIcon( QIcon::fromTheme( QLatin1String( "tab-close" ) ) ); diff --git a/blogilo/src/toolbox.cpp b/blogilo/src/toolbox.cpp index e75cac43f2..b88f07bb5c 100644 --- a/blogilo/src/toolbox.cpp +++ b/blogilo/src/toolbox.cpp @@ -34,9 +34,9 @@ #include "catcheckbox.h" #include "settings.h" -#include +#include #include -#include +#include #include #include #include @@ -492,14 +492,14 @@ void Toolbox::requestEntriesListContextMenu( const QPoint & pos ) if ( lstEntriesList->selectedItems().isEmpty() ) return; Q_UNUSED(pos); - KMenu *entriesContextMenu = new KMenu; - KAction *actEntriesOpenInBrowser = new KAction( QIcon::fromTheme(QLatin1String("applications-internet")), + QMenu *entriesContextMenu = new QMenu; + QAction *actEntriesOpenInBrowser = new QAction( QIcon::fromTheme(QLatin1String("applications-internet")), i18n("Open in browser"), entriesContextMenu ); connect( actEntriesOpenInBrowser, SIGNAL(triggered()), this, SLOT(openPostInBrowser()) ); - KAction *actEntriesCopyUrl = new KAction( QIcon::fromTheme(QLatin1String("edit-copy")), + QAction *actEntriesCopyUrl = new QAction( QIcon::fromTheme(QLatin1String("edit-copy")), i18n("Copy URL"), entriesContextMenu ); connect( actEntriesCopyUrl, SIGNAL(triggered(bool)), this, SLOT(slotEntriesCopyUrl()) ); - KAction *actEntriesCopyTitle = new KAction( QIcon::fromTheme(QLatin1String("edit-copy")), + QAction *actEntriesCopyTitle = new QAction( QIcon::fromTheme(QLatin1String("edit-copy")), i18n("Copy title"), entriesContextMenu ); connect( actEntriesCopyTitle, SIGNAL(triggered(bool)), this, SLOT(copyPostTitle()) ); entriesContextMenu->addAction( actEntriesOpenInBrowser ); diff --git a/importwizard/importwizard.cpp b/importwizard/importwizard.cpp index f65a2016a2..7e39a3f89e 100644 --- a/importwizard/importwizard.cpp +++ b/importwizard/importwizard.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include diff --git a/kleopatra/kgpgconf/CMakeLists.txt b/kleopatra/kgpgconf/CMakeLists.txt index fea0a5a65f..fe7a36d1eb 100644 --- a/kleopatra/kgpgconf/CMakeLists.txt +++ b/kleopatra/kgpgconf/CMakeLists.txt @@ -3,7 +3,7 @@ project(kgpgconf) include_directories(${CMAKE_SOURCE_DIR}/libkleo/backends/qgpgme) add_definitions(-D_ASSUAN_ONLY_GPG_ERRORS -DKDE_DEFAULT_DEBUG_AREA=5154) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") +kde_enable_exceptions() set(_kgpgconf_SRCS configreader.cpp @@ -14,13 +14,13 @@ set(_kgpgconf_SRCS mainwindow.cpp ) -kde4_add_ui_files(_kgpgconf_SRCS mainwidget.ui) +qt5_wrap_ui(_kgpgconf_SRCS mainwidget.ui) # todo: more appropriate icon? kde4_add_app_icon(_kgpgconf_SRCS "${KDE4_ICON_DIR}/oxygen/*/apps/preferences-desktop-cryptography.png") -kde4_add_executable(kgpgconf ${_kgpgconf_SRCS}) +add_executable(kgpgconf ${_kgpgconf_SRCS}) -target_link_libraries(kgpgconf ${QGPGME_LIBRARIES} ${KDE4_KDEUI_LIBS}) +target_link_libraries(kgpgconf ${QGPGME_LIBRARIES} Qt5::Core KF5::KDELibs4Support ) install(TARGETS kgpgconf ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/libkdepim/addressline/addresseelineedit.cpp b/libkdepim/addressline/addresseelineedit.cpp index dba21242ff..6da619bc8b 100644 --- a/libkdepim/addressline/addresseelineedit.cpp +++ b/libkdepim/addressline/addresseelineedit.cpp @@ -1210,17 +1210,17 @@ void AddresseeLineEdit::dropEvent( QDropEvent *event ) return; } } else { -//QT5 -#if 0 // Let's see if this drop contains a comma separated list of emails - const QString dropData = QString::fromUtf8( event->encodedData( "text/plain" ) ); - const QStringList addrs = KPIMUtils::splitAddressList( dropData ); - if ( !addrs.isEmpty() ) { - setText( KPIMUtils::normalizeAddressesAndDecodeIdn( dropData ) ); - setModified( true ); - return; + const QMimeData *mimeData = event->mimeData(); + if (mimeData->hasText() ) { + const QString dropData = mimeData->text(); + const QStringList addrs = KPIMUtils::splitAddressList( dropData ); + if ( !addrs.isEmpty() ) { + setText( KPIMUtils::normalizeAddressesAndDecodeIdn( dropData ) ); + setModified( true ); + return; + } } -#endif } } -- GitLab