Commit fcd20a2e authored by Laurent Montel's avatar Laurent Montel 😁

Port++

parent 15e37364
......@@ -58,7 +58,7 @@
#include <KToggleAction>
#include <kactioncollection.h>
#include <KActionMenu>
#include <KAction>
#include <QAction>
#include <kconfigdialog.h>
#include <qdebug.h>
#include <kmessagebox.h>
......@@ -66,7 +66,7 @@
#include <KSelectAction>
#include <kimagefilepreview.h>
#include <KToolInvocation>
#include <KMenu>
#include <QMenu>
#include <QDockWidget>
#include <QProgressBar>
......@@ -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()) );
......
......@@ -19,7 +19,7 @@
#include <KLocale>
#include <QIcon>
#include <KMenu>
#include <QMenu>
#include <QToolButton>
#include <QTabBar>
......@@ -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" ) ) );
......
......@@ -34,9 +34,9 @@
#include "catcheckbox.h"
#include "settings.h"
#include <KMenu>
#include <QMenu>
#include <QIcon>
#include <KAction>
#include <QAction>
#include <KToolInvocation>
#include <QClipboard>
#include <QTimer>
......@@ -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 );
......
......@@ -47,7 +47,7 @@
#include <qdebug.h>
#include <KMessageBox>
#include <KHelpMenu>
#include <KMenu>
#include <QMenu>
#include <AkonadiCore/control.h>
#include <mailcommon/kernel/mailkernel.h>
......
......@@ -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})
......@@ -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
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment