Commit 4adfbe84 authored by Alex Richardson's avatar Alex Richardson

Port to KF5/Qt5

To build for KF5 pass the option -DQT5_BUILD=ON to CMake

TerminalDisplayAccessible is disabled for Qt5 currently since I don't
have any experience with accessible stuff and it is more complicated
than just changing a few includes

REVIEW: 111937
parent 4884fcdc
project(Konsole)
find_package(KDE4 4.7.0 REQUIRED)
option(QT5_BUILD "Build using Qt5" OFF)
include(FeatureSummary)
if(QT5_BUILD)
find_package(Qt5Core NO_MODULE)
set_package_properties(Qt5Core PROPERTIES TYPE REQUIRED)
message(STATUS "Qt5 build")
find_package(ECM 0.0.9 NO_MODULE)
set_package_properties(ECM PROPERTIES TYPE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
find_package(Qt5Transitional MODULE)
set_package_properties(Qt5Transitional PROPERTIES TYPE REQUIRED)
find_package(kdeqt5staging NO_MODULE)
set_package_properties(kdeqt5staging PROPERTIES TYPE REQUIRED)
find_package(KF5 MODULE REQUIRED COMPONENTS CMake Compiler InstallDirs
KDBusAddons KCoreAddons KConfig
KCodecs KI18n KService KWidgetsAddons
KWindowSystem KCrash Sonnet
KArchive ItemModels KAuth KGuiAddons KConfigWidgets
ItemViews KNotifications KJS
KJobWidgets KIconThemes KCompletion KTextWidgets
XmlGui Solid KWallet KIO KUnitConversion KDE4Attic
)
find_package(KDELibs4 NO_MODULE) #needed for KDE4Support
set_package_properties(KDELibs4 PROPERTIES TYPE REQUIRED)
find_package(KDE4Support NO_MODULE)
set_package_properties(KDE4Support PROPERTIES TYPE REQUIRED)
remove_definitions(-DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_CAST_FROM_ASCII)
add_definitions(-Wno-deprecated-declarations)
set(KDE4_KIO_LIBS ${KDE4_KIO_LIBS} ${KDE4Support_LIBRARIES})
else()
message(STATUS "Qt4 build")
find_package(KDE4 4.10.0)
set_package_properties(KDE4 PROPERTIES TYPE REQUIRED)
include(KDE4Defaults)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
kde4_no_enable_final(konsole)
endif()
include(KDE4Defaults)
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1211)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
kde4_no_enable_final(konsole)
add_subdirectory( src )
add_subdirectory( data )
add_subdirectory( desktop )
add_subdirectory( doc/manual )
macro_display_feature_log()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -31,6 +31,8 @@
#include <KShell>
#include <KBookmarkMenu>
#include <KStandardDirs>
#include <KLocalizedString>
#include <KMenu>
// Konsole
#include "ViewProperties.h"
......@@ -38,7 +40,11 @@
using namespace Konsole;
BookmarkHandler::BookmarkHandler(KActionCollection* collection,
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KMenu* menu,
#else
QMenu* menu,
#endif
bool toplevel,
QObject* parent)
: QObject(parent),
......
......@@ -26,11 +26,13 @@
// KDE
#include <KBookmarkManager>
#include <KUrl>
// Konsole
#include "konsole_export.h"
class KMenu;
class QMenu;
class KBookmarkMenu;
class KActionCollection;
......@@ -62,7 +64,11 @@ public:
* @param toplevel TODO: Document me
* @param parent The parent object
*/
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
BookmarkHandler(KActionCollection* collection , KMenu* menu, bool toplevel , QObject* parent);
#else
BookmarkHandler(KActionCollection* collection , QMenu* menu, bool toplevel , QObject* parent);
#endif
~BookmarkHandler();
virtual QString currentUrl() const;
......@@ -75,7 +81,11 @@ public:
/**
* Returns the menu which this bookmark handler inserts its actions into.
*/
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KMenu* menu() const {
#else
QMenu* menu() const {
#endif
return _menu;
}
......@@ -105,7 +115,11 @@ signals:
* @param urls The urls of the bookmarks in the folder whose
* 'Open Folder in Tabs' action was triggered
*/
#if QT_VERSION < 0x50000 //moc doesn't understand the QT_VERSION_CHECK macro
void openUrls(const QList<KUrl>& urls);
#else
void openUrls(const QList<QUrl>& urls);
#endif
private slots:
void openBookmark(const KBookmark& bm, Qt::MouseButtons, Qt::KeyboardModifiers);
......@@ -114,7 +128,11 @@ private:
QString titleForView(ViewProperties* view) const;
QString urlForView(ViewProperties* view) const;
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KMenu* _menu;
#else
QMenu* _menu;
#endif
KBookmarkMenu* _bookmarkMenu;
QString _file;
bool _toplevel;
......
# cmake-options : -WITH_LibKonq=ON or OFF; default is ON
macro_optional_find_package(LibKonq)
macro_bool_to_01(LIBKONQ_FOUND HAVE_LIBKONQ)
# cmake-options : -DCMAKE_DISABLE_FIND_PACKAGE_LibKonq=TRUE or FALSE; default is FALSE
if (NOT QT5_BUILD) # there is no libkonq for Qt5 yet
find_package(LibKonq)
set_package_properties(LibKonq PROPERTIES DESCRIPTION "Provides high-level file management functions"
URL "https://projects.kde.org/projects/kde/applications/kde-baseapps" TYPE OPTIONAL
PURPOSE "Required for drag-n-drop menus")
endif()
macro_log_feature(LIBKONQ_FOUND "LibKonq"
"Provides high-level file management functions"
"https://projects.kde.org/projects/kde/applications/kde-baseapps"
FALSE "" "Required for drag-n-drop menus")
macro_bool_to_01(LIBKONQ_FOUND HAVE_LIBKONQ)
if(HAVE_LIBKONQ)
include_directories(${LIBKONQ_INCLUDE_DIR})
......
......@@ -292,7 +292,7 @@ void ColorScheme::read(const KConfig& config)
const QString schemeDescription = configGroup.readEntry("Description", I18N_NOOP("Un-named Color Scheme"));
_description = i18n(schemeDescription.toUtf8());
_description = i18n(schemeDescription.toUtf8().constData());
_opacity = configGroup.readEntry("Opacity", qreal(1.0));
setWallpaper(configGroup.readEntry("Wallpaper", QString()));
......
......@@ -29,6 +29,9 @@
#include <KWindowSystem>
#include <KFileDialog>
#include <KUrlCompletion>
#include <KIcon>
#include <KUrl>
#include <KLocalizedString>
// Konsole
#include "ui_ColorSchemeEditor.h"
......@@ -156,7 +159,7 @@ void ColorSchemeEditor::editColorItem(QTableWidgetItem* item)
}
void ColorSchemeEditor::selectWallpaper()
{
const KUrl url = KFileDialog::getImageOpenUrl(_ui->wallpaperPath->text(),
const KUrl url = KFileDialog::getImageOpenUrl(KUrl(_ui->wallpaperPath->text()),
this,
i18nc("@action:button", "Select wallpaper image file"));
......
......@@ -149,7 +149,7 @@ bool KDE3ColorSchemeReader::readTitleLine(const QString& line, ColorScheme* sche
QString description = line.mid(spacePos + 1);
scheme->setDescription(i18n(description.toUtf8()));
scheme->setDescription(i18n(description.toUtf8().constData()));
return true;
}
......
......@@ -48,6 +48,7 @@
#include <KWindowSystem>
#include <KTextEdit>
#include <KMessageBox>
#include <KUrl>
// Konsole
#include "ColorScheme.h"
......@@ -261,7 +262,11 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr profile)
_ui->commandEdit->setText(command.fullCommand());
KUrlCompletion* exeCompletion = new KUrlCompletion(KUrlCompletion::ExeCompletion);
exeCompletion->setParent(this);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
exeCompletion->setDir(QString());
#else
exeCompletion->setDir(QUrl());
#endif
_ui->commandEdit->setCompletionObject(exeCompletion);
_ui->initialDirEdit->setText(profile->defaultWorkingDirectory());
......@@ -395,7 +400,7 @@ void EditProfileDialog::commandChanged(const QString& command)
}
void EditProfileDialog::selectInitialDir()
{
const KUrl url = KFileDialog::getExistingDirectoryUrl(_ui->initialDirEdit->text(),
const KUrl url = KFileDialog::getExistingDirectoryUrl(KUrl(_ui->initialDirEdit->text()),
this,
i18n("Select Initial Directory"));
......@@ -1213,7 +1218,11 @@ void EditProfileDialog::showFontDialog()
QFont currentFont = _ui->fontPreviewLabel->font();
QWeakPointer<KFontDialog> dialog = new KFontDialog(this, KFontChooser::FixedFontsOnly);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
dialog.data()->setCaption(i18n("Select Fixed Width Font"));
#else
dialog.data()->setWindowTitle(i18n("Select Fixed Width Font"));
#endif
dialog.data()->setFont(currentFont, true);
// TODO (hindenburg): When https://git.reviewboard.kde.org/r/103357 is
......
......@@ -192,7 +192,7 @@ void Emulation::sendKeyEvent(QKeyEvent* ev)
// A block of text
// Note that the text is proper unicode.
// We should do a conversion here
emit sendData(ev->text().toUtf8(), ev->text().length());
emit sendData(ev->text().toUtf8().constData(), ev->text().length());
}
}
......
......@@ -30,6 +30,7 @@
// KDE
#include <KLocalizedString>
#include <KRun>
#include <KUrl>
// Konsole
#include "TerminalCharacterDecoder.h"
......@@ -423,7 +424,7 @@ void UrlFilter::HotSpot::activate(QObject* object)
url.prepend("mailto:");
}
new KRun(url, QApplication::activeWindow());
new KRun(KUrl(url), QApplication::activeWindow());
}
}
......
......@@ -22,6 +22,8 @@
// Qt
#include <QtGui/QKeyEvent>
// KDE
#include <KIcon>
// Konsole
#include "ui_KeyBindingEditor.h"
......
......@@ -90,7 +90,7 @@ KeyboardTranslatorReader::KeyboardTranslatorReader(QIODevice* source)
while (_description.isEmpty() && !source->atEnd()) {
QList<Token> tokens = tokenize(QString::fromLocal8Bit(source->readLine()));
if (!tokens.isEmpty() && tokens.first().type == Token::TitleKeyword)
_description = i18n(tokens[1].text.toUtf8());
_description = i18n(tokens[1].text.toUtf8().constData());
}
// read first entry (if any)
readNext();
......
......@@ -25,6 +25,7 @@
// Qt
#include <QtCore/QHash>
#include <QtCore/QList>
#include <QtCore/QString>
//#include <QtGui/QKeySequence>
#include <QtCore/QMetaType>
......
......@@ -28,6 +28,7 @@
// KDE
#include <KDebug>
#include <KGlobal>
#include <KStandardDirs>
using namespace Konsole;
......
......@@ -42,6 +42,8 @@
#include <KNotifyConfigWidget>
#include <KConfigDialog>
#include <KApplication>
#include <KGlobal>
#include <KShortcut>
// Konsole
#include "BookmarkHandler.h"
......@@ -153,7 +155,9 @@ void MainWindow::removeMenuAccelerators()
{
foreach(QAction* menuItem, menuBar()->actions()) {
QString itemText = menuItem->text();
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
itemText = KGlobal::locale()->removeAcceleratorMarker(itemText);
#endif
menuItem->setText(itemText);
}
}
......@@ -283,12 +287,18 @@ IncrementalSearchBar* MainWindow::searchBar() const
void MainWindow::setupActions()
{
KActionCollection* collection = actionCollection();
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KAction* menuAction = 0;
#else
QAction* menuAction = 0;
#endif
// File Menu
_newTabMenuAction = new KActionMenu(KIcon("tab-new"), i18nc("@action:inmenu", "&New Tab"), collection);
_newTabMenuAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_T));
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
_newTabMenuAction->setShortcutConfigurable(true);
#endif
_newTabMenuAction->setAutoRepeat(false);
connect(_newTabMenuAction, SIGNAL(triggered()), this, SLOT(newTab()));
collection->addAction("new-tab", _newTabMenuAction);
......@@ -317,7 +327,11 @@ void MainWindow::setupActions()
KActionMenu* bookmarkMenu = new KActionMenu(i18nc("@title:menu", "&Bookmarks"), collection);
_bookmarkHandler = new BookmarkHandler(collection, bookmarkMenu->menu(), true, this);
collection->addAction("bookmark", bookmarkMenu);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
connect(_bookmarkHandler, SIGNAL(openUrls(QList<KUrl>)), this, SLOT(openUrls(QList<KUrl>)));
#else
connect(_bookmarkHandler, SIGNAL(openUrls(QList<QUrl>)), this, SLOT(openUrls(QList<QUrl>)));
#endif
// Settings Menu
_toggleMenuBarAction = KStandardAction::showMenubar(menuBar(), SLOT(setVisible(bool)), collection);
......@@ -373,7 +387,12 @@ void MainWindow::profileListChanged(const QList<QAction*>& sessionActions)
// it if it is the non-default profile.
if (sessionActions.size() > 2) {
// Update the 'New Tab' KActionMenu
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KMenu* newTabMenu = _newTabMenuAction->menu();
#else
QMenu* newTabMenu = _newTabMenuAction->menu();
#endif
newTabMenu->clear();
foreach(QAction* sessionAction, sessionActions) {
newTabMenu->addAction(sessionAction);
......@@ -389,7 +408,11 @@ void MainWindow::profileListChanged(const QList<QAction*>& sessionActions)
}
}
} else {
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KMenu* newTabMenu = _newTabMenuAction->menu();
#else
QMenu* newTabMenu = _newTabMenuAction->menu();
#endif
newTabMenu->clear();
Profile::Ptr profile = ProfileManager::instance()->defaultProfile();
......@@ -416,7 +439,11 @@ QString MainWindow::activeSessionDir() const
}
}
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
void MainWindow::openUrls(const QList<KUrl>& urls)
#else
void MainWindow::openUrls(const QList<QUrl>& urls)
#endif
{
Profile::Ptr defaultProfile = ProfileManager::instance()->defaultProfile();
......
......@@ -163,8 +163,12 @@ private slots:
void updateWindowIcon();
void updateWindowCaption();
//moc doesn't understand QT_VERSION_CHECK
#if QT_VERSION < 0x50000
void openUrls(const QList<KUrl>& urls);
#else
void openUrls(const QList<QUrl>& urls);
#endif
// Sets the list of profiles to be displayed under the "New Tab" action
void setProfileList(ProfileList* list);
......
......@@ -30,6 +30,9 @@
#include <KActionCollection>
#include <KLocale>
#include <KPluginFactory>
#include <KUrl>
#include <KGlobal>
#include <KLocalizedString>
#include <kde_file.h>
// Konsole
......@@ -54,10 +57,12 @@ Part::Part(QWidget* parentWidget , QObject* parent, const QVariantList&)
, _pluggedController(0)
, _manageProfilesAction(0)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
// make sure the konsole catalog is loaded
KGlobal::locale()->insertCatalog("konsole");
// make sure the libkonq catalog is loaded( needed for drag & drop )
KGlobal::locale()->insertCatalog("libkonq");
#endif
// setup global actions
createGlobalActions();
......@@ -321,10 +326,16 @@ void Part::changeSessionSettings(const QString& text)
sendInput(command);
}
// Konqueror integration
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
bool Part::openUrl(const KUrl& aUrl)
{
#else
bool Part::openUrl(const QUrl& aQUrl)
{
KUrl aUrl = aQUrl;
#endif
if (url() == aUrl) {
emit completed();
return true;
......
......@@ -33,6 +33,7 @@
class QAction;
class QStringList;
class QKeyEvent;
class KUrl;
namespace Konsole
{
......@@ -191,8 +192,13 @@ signals:
protected:
/** Reimplemented from KParts::PartBase. */
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
virtual bool openFile();
virtual bool openUrl(const KUrl& url);
#else
virtual bool openFile() Q_DECL_OVERRIDE;
virtual bool openUrl(const QUrl& url) Q_DECL_OVERRIDE;
#endif
private slots:
void activeViewChanged(SessionController* controller);
......@@ -202,7 +208,6 @@ private slots:
void newTab();
void overrideTerminalShortcut(QKeyEvent*, bool& override);
void sessionStateChanged(int state);
private:
Session* activeSession() const;
void createGlobalActions();
......
......@@ -23,6 +23,7 @@
// KDE
#include <KConfigGroup>
#include <KSharedConfig>
#include <KGlobal>
using namespace Konsole;
......
......@@ -189,7 +189,7 @@ FallbackProfile::FallbackProfile()
setProperty(LineSpacing, 0);
setProperty(CursorShape, Enum::BlockCursor);
setProperty(UseCustomCursorColor, false);
setProperty(CustomCursorColor, Qt::black);
setProperty(CustomCursorColor, QColor(Qt::black));
setProperty(BellMode, Enum::NotifyBell);
setProperty(DefaultEncoding, QString(QTextCodec::codecForLocale()->name()));
......
......@@ -50,8 +50,10 @@
#include <KDebug>
#include <KUriFilter>
#include <KStringHandler>
#include <KSharedConfig>
#include <KConfigGroup>
#include <KGlobal>
#include <KShortcut>
#include <kdeversion.h>
#if KDE_IS_VERSION(4, 9, 1)
......@@ -90,9 +92,10 @@ using namespace Konsole;
// TODO - Replace the icon choices below when suitable icons for silence and
// activity are available
const KIcon SessionController::_activityIcon("dialog-information");
const KIcon SessionController::_silenceIcon("dialog-information");
const KIcon SessionController::_broadcastIcon("emblem-important");
//having global static KIcons no longer works with Qt5/KF5, use K_GLOBAL_STATIC
K_GLOBAL_STATIC_WITH_ARGS(KIcon, _activityIcon, ("dialog-information"));
K_GLOBAL_STATIC_WITH_ARGS(KIcon, _silenceIcon, ("dialog-information"));
K_GLOBAL_STATIC_WITH_ARGS(KIcon, _broadcastIcon, ("emblem-important"));
QSet<SessionController*> SessionController::_allControllers;
int SessionController::_lastControllerId;
......@@ -548,7 +551,12 @@ void SessionController::setShowMenuAction(QAction* action)
void SessionController::setupCommonActions()
{
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KAction* action = 0;
#else
QAction* action = 0;
#endif
KActionCollection* collection = actionCollection();
// Close Session
......@@ -573,10 +581,17 @@ void SessionController::setupCommonActions()
action->setEnabled(false);
action = KStandardAction::paste(this, SLOT(paste()), collection);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KShortcut pasteShortcut = action->shortcut();
pasteShortcut.setPrimary(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_V));
pasteShortcut.setAlternate(QKeySequence(Qt::SHIFT + Qt::Key_Insert));
action->setShortcut(pasteShortcut);
#else
QList<QKeySequence> pasteShortcut;
pasteShortcut.append(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_V));
pasteShortcut.append(QKeySequence(Qt::SHIFT + Qt::Key_Insert));
action->setShortcuts(pasteShortcut);
#endif
action = collection->addAction("paste-selection", this, SLOT(pasteFromX11Selection()));
action->setText(i18n("Paste Selection"));
......@@ -643,7 +658,11 @@ void SessionController::setupCommonActions()
void SessionController::setupExtraActions()
{
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KAction* action = 0;
#else
QAction* action = 0;
#endif
KToggleAction* toggleAction = 0;
KActionCollection* collection = actionCollection();
......@@ -702,15 +721,27 @@ void SessionController::setupExtraActions()
action = collection->addAction("enlarge-font", this, SLOT(increaseFontSize()));
action->setText(i18n("Enlarge Font"));
action->setIcon(KIcon("format-font-size-more"));
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
KShortcut enlargeFontShortcut = action->shortcut();
enlargeFontShortcut.setPrimary(QKeySequence(Qt::CTRL + Qt::Key_Plus));
enlargeFontShortcut.setAlternate(QKeySequence(Qt::CTRL + Qt::Key_Equal));
action->setShortcut(enlargeFontShortcut);
#else
QList<QKeySequence> enlargeFontShortcut;
enlargeFontShortcut.append(QKeySequence(Qt::CTRL + Qt::Key_Plus));
enlargeFontShortcut.append(QKeySequence(Qt::CTRL + Qt::Key_Equal));
action->setShortcuts(enlargeFontShortcut);
#endif
action = collection->addAction("shrink-font", this, SLOT(decreaseFontSize()));
action->setText(i18n("Shrink Font"));
action->setIcon(KIcon("format-font-size-less"));
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
action->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Minus));
#else
action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus));
#endif
// Send signal
KSelectAction* sendSignalActions = collection->add<KSelectAction>("send-signal");
......@@ -918,10 +949,19 @@ void SessionController::openBrowser()
{
KUrl currentUrl = url();
if (currentUrl.isLocalFile())
if (currentUrl.isLocalFile()) {
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
new KRun(currentUrl, QApplication::activeWindow(), 0, true, true);
else
#else
new KRun(currentUrl, QApplication::activeWindow(), true);
#endif
} else {
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
new KRun(KUrl(QDir::homePath()), QApplication::activeWindow(), 0, true, true);
#else
new KRun(QUrl::fromLocalFile(QDir::homePath()), QApplication::activeWindow(), true);
#endif
}
}
void SessionController::copy()
......@@ -1381,7 +1421,7 @@ void SessionController::updateSessionIcon()
// Visualize that the session is broadcasting to others
if (_copyToGroup && _copyToGroup->sessions().count() > 1) {
// Master Mode: set different icon, to warn the user to be careful
setIcon(_broadcastIcon);
setIcon(*_broadcastIcon);
} else {
if (!_keepIconUntilInteraction) {
// Not in Master Mode: use normal icon
......@@ -1393,7 +1433,11 @@ void SessionController::sessionTitleChanged()
{
if (_sessionIconName != _session->iconName()) {
_sessionIconName = _session->iconName();
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
_sessionIcon = KIcon(_sessionIconName);