Commit a83db715 authored by Alex Richardson's avatar Alex Richardson

Port to KF5/Qt5

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 205a5183
project(Konsole)
find_package(KDE4 4.7.0 REQUIRED)
include(FeatureSummary)
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})
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)
#TODO: this is temporarily disabled until it has been ported to Qt5
add_definitions(-DQT_NO_ACCESSIBILITY)
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,7 @@
using namespace Konsole;
BookmarkHandler::BookmarkHandler(KActionCollection* collection,
KMenu* menu,
QMenu* menu,
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,7 @@ public:
* @param toplevel TODO: Document me
* @param parent The parent object
*/
BookmarkHandler(KActionCollection* collection , KMenu* menu, bool toplevel , QObject* parent);
BookmarkHandler(KActionCollection* collection , QMenu* menu, bool toplevel , QObject* parent);
~BookmarkHandler();
virtual QString currentUrl() const;
......@@ -75,7 +77,7 @@ public:
/**
* Returns the menu which this bookmark handler inserts its actions into.
*/
KMenu* menu() const {
QMenu* menu() const {
return _menu;
}
......@@ -105,7 +107,7 @@ signals:
* @param urls The urls of the bookmarks in the folder whose
* 'Open Folder in Tabs' action was triggered
*/
void openUrls(const QList<KUrl>& urls);
void openUrls(const QList<QUrl>& urls);
private slots:
void openBookmark(const KBookmark& bm, Qt::MouseButtons, Qt::KeyboardModifiers);
......@@ -114,7 +116,7 @@ private:
QString titleForView(ViewProperties* view) const;
QString urlForView(ViewProperties* view) const;
KMenu* _menu;
QMenu* _menu;
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
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")
if (FALSE) # 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")
else()
message(WARNING "LibKonq does not exist for KF5 yet, reenable this check once it exists.")
endif()
macro_bool_to_01(LIBKONQ_FOUND HAVE_LIBKONQ)
if(HAVE_LIBKONQ)
include_directories(${LIBKONQ_INCLUDE_DIR})
......@@ -143,7 +147,15 @@ kde4_add_ui_files(konsoleprivate_SRCS ColorSchemeEditor.ui
settings/TabBarSettings.ui)
kde4_add_library(konsoleprivate SHARED ${konsoleprivate_SRCS})
target_link_libraries(konsoleprivate ${konsole_LIBS})
target_link_libraries(konsoleprivate ${konsole_LIBS}
KF5::XmlGui
Qt5::PrintSupport
KF5::KNotifications
KF5::KWindowSystem
KF5::KTextWidgets
KF5::KGuiAddons
KF5::KIconThemes
)
target_link_libraries(konsoleprivate LINK_INTERFACE_LIBRARIES ${konsole_LIBS})
set(konsole_KDEINIT_SRCS
......@@ -158,7 +170,7 @@ kde4_add_kcfg_files(konsole_KDEINIT_SRCS settings/KonsoleSettings.kcfgc)
kde4_add_app_icon(konsole_KDEINIT_SRCS "${KDE4_ICON_INSTALL_DIR}/oxygen/*/apps/utilities-terminal.png")
kde4_add_kdeinit_executable(konsole ${konsole_KDEINIT_SRCS})
target_link_libraries(kdeinit_konsole konsoleprivate)
target_link_libraries(kdeinit_konsole konsoleprivate KF5::XmlGui KF5::KWindowSystem)
install(TARGETS kdeinit_konsole konsole konsoleprivate
${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -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,7 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr profile)
_ui->commandEdit->setText(command.fullCommand());
KUrlCompletion* exeCompletion = new KUrlCompletion(KUrlCompletion::ExeCompletion);
exeCompletion->setParent(this);
exeCompletion->setDir(QString());
exeCompletion->setDir(QUrl());
_ui->commandEdit->setCompletionObject(exeCompletion);
_ui->initialDirEdit->setText(profile->defaultWorkingDirectory());
......@@ -395,7 +396,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 +1214,7 @@ void EditProfileDialog::showFontDialog()
QFont currentFont = _ui->fontPreviewLabel->font();
QWeakPointer<KFontDialog> dialog = new KFontDialog(this, KFontChooser::FixedFontsOnly);
dialog.data()->setCaption(i18n("Select Fixed Width Font"));
dialog.data()->setWindowTitle(i18n("Select Fixed Width Font"));
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;
......
......@@ -31,6 +31,7 @@
#include <KCmdLineArgs>
#include <KShortcutsDialog>
#include <KLocale>
#include <KMenu>
#include <KMenuBar>
#include <KMessageBox>
......@@ -42,6 +43,8 @@
#include <KNotifyConfigWidget>
#include <KConfigDialog>
#include <KApplication>
#include <KGlobal>
#include <KShortcut>
// Konsole
#include "BookmarkHandler.h"
......@@ -153,7 +156,10 @@ void MainWindow::removeMenuAccelerators()
{
foreach(QAction* menuItem, menuBar()->actions()) {
QString itemText = menuItem->text();
#pragma message("TODO: How to port KLocale::removeAcceleratorMarker()?")
#if 0
itemText = KGlobal::locale()->removeAcceleratorMarker(itemText);
#endif
menuItem->setText(itemText);
}
}
......@@ -283,12 +289,16 @@ IncrementalSearchBar* MainWindow::searchBar() const
void MainWindow::setupActions()
{
KActionCollection* collection = actionCollection();
KAction* menuAction = 0;
QAction* menuAction = 0;
// File Menu
_newTabMenuAction = new KActionMenu(KIcon("tab-new"), i18nc("@action:inmenu", "&New Tab"), collection);
_newTabMenuAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_T));
#pragma message("TODO: How to port KAction::setShortcutConfigurable()?")
#if 0
_newTabMenuAction->setShortcutConfigurable(true);
#endif
_newTabMenuAction->setAutoRepeat(false);
connect(_newTabMenuAction, SIGNAL(triggered()), this, SLOT(newTab()));
collection->addAction("new-tab", _newTabMenuAction);
......@@ -317,7 +327,7 @@ void MainWindow::setupActions()
KActionMenu* bookmarkMenu = new KActionMenu(i18nc("@title:menu", "&Bookmarks"), collection);
_bookmarkHandler = new BookmarkHandler(collection, bookmarkMenu->menu(), true, this);
collection->addAction("bookmark", bookmarkMenu);
connect(_bookmarkHandler, SIGNAL(openUrls(QList<KUrl>)), this, SLOT(openUrls(QList<KUrl>)));
connect(_bookmarkHandler, SIGNAL(openUrls(QList<QUrl>)), this, SLOT(openUrls(QList<QUrl>)));
// Settings Menu
_toggleMenuBarAction = KStandardAction::showMenubar(menuBar(), SLOT(setVisible(bool)), collection);
......@@ -373,7 +383,8 @@ void MainWindow::profileListChanged(const QList<QAction*>& sessionActions)
// it if it is the non-default profile.
if (sessionActions.size() > 2) {
// Update the 'New Tab' KActionMenu
KMenu* newTabMenu = _newTabMenuAction->menu();
QMenu* newTabMenu = _newTabMenuAction->menu();
newTabMenu->clear();
foreach(QAction* sessionAction, sessionActions) {
newTabMenu->addAction(sessionAction);
......@@ -389,7 +400,7 @@ void MainWindow::profileListChanged(const QList<QAction*>& sessionActions)
}
}
} else {
KMenu* newTabMenu = _newTabMenuAction->menu();
QMenu* newTabMenu = _newTabMenuAction->menu();
newTabMenu->clear();
Profile::Ptr profile = ProfileManager::instance()->defaultProfile();
......@@ -416,7 +427,7 @@ QString MainWindow::activeSessionDir() const
}
}
void MainWindow::openUrls(const QList<KUrl>& urls)
void MainWindow::openUrls(const QList<QUrl>& urls)
{
Profile::Ptr defaultProfile = ProfileManager::instance()->defaultProfile();
......
......@@ -163,8 +163,7 @@ private slots:
void updateWindowIcon();
void updateWindowCaption();
void openUrls(const QList<KUrl>& urls);
void openUrls(const QList<QUrl>& urls);
// 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,13 @@ Part::Part(QWidget* parentWidget , QObject* parent, const QVariantList&)
, _pluggedController(0)
, _manageProfilesAction(0)
{
#pragma message("TODO: How to port KLocale::insertCatalog()?")
#if 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 +327,11 @@ void Part::changeSessionSettings(const QString& text)
sendInput(command);
}
// Konqueror integration
bool Part::openUrl(const KUrl& aUrl)
bool Part::openUrl(const QUrl& aQUrl)
{
KUrl aUrl = aQUrl;
if (url() == aUrl) {
emit completed();
return true;
......
......@@ -33,6 +33,7 @@
class QAction;
class QStringList;
class QKeyEvent;
class KUrl;
namespace Konsole
{
......@@ -191,8 +192,8 @@ signals:
protected:
/** Reimplemented from KParts::PartBase. */
virtual bool openFile();
virtual bool openUrl(const KUrl& url);
virtual bool openFile() Q_DECL_OVERRIDE;
virtual bool openUrl(const QUrl& url) Q_DECL_OVERRIDE;
private slots:
void activeViewChanged(SessionController* controller);
......@@ -202,7 +203,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,8 @@ void SessionController::setShowMenuAction(QAction* action)
void SessionController::setupCommonActions()
{
KAction* action = 0;
QAction* action = 0;
KActionCollection* collection = actionCollection();
// Close Session
......@@ -573,10 +577,10 @@ void SessionController::setupCommonActions()
action->setEnabled(false);
action = KStandardAction::paste(this, SLOT(paste()), collection);
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);
QList<QKeySequence> pasteShortcut;
pasteShortcut.append(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_V));
pasteShortcut.append(QKeySequence(Qt::SHIFT + Qt::Key_Insert));
action->setShortcuts(pasteShortcut);
action = collection->addAction("paste-selection", this, SLOT(pasteFromX11Selection()));
action->setText(i18n("Paste Selection"));
......@@ -643,7 +647,7 @@ void SessionController::setupCommonActions()
void SessionController::setupExtraActions()
{
KAction* action = 0;
QAction* action = 0;
KToggleAction* toggleAction = 0;
KActionCollection* collection = actionCollection();
......@@ -702,15 +706,16 @@ void SessionController::setupExtraActions()
action = collection->addAction("enlarge-font", this, SLOT(increaseFontSize()));
action->setText(i18n("Enlarge Font"));
action->setIcon(KIcon("format-font-size-more"));
KShortcut enlargeFontShortcut = action->shortcut();
enlargeFontShortcut.setPrimary(QKeySequence(Qt::CTRL + Qt::Key_Plus));
enlargeFontShortcut.setAlternate(QKeySequence(Qt::CTRL + Qt::Key_Equal));
action->setShortcut(enlargeFontShortcut);
QList<QKeySequence> enlargeFontShortcut;
enlargeFontShortcut.append(QKeySequence(Qt::CTRL + Qt::Key_Plus));
enlargeFontShortcut.append(QKeySequence(Qt::CTRL + Qt::Key_Equal));
action->setShortcuts(enlargeFontShortcut);
action = collection->addAction("shrink-font", this, SLOT(decreaseFontSize()));
action->setText(i18n("Shrink Font"));
action->setIcon(KIcon("format-font-size-less"));
action->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Minus));
action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus));
// Send signal
KSelectAction* sendSignalActions = collection->add<KSelectAction>("send-signal");
......@@ -918,10 +923,11 @@ void SessionController::openBrowser()
{
KUrl currentUrl = url();
if (currentUrl.isLocalFile())
new KRun(currentUrl, QApplication::activeWindow(), 0, true, true);
else
new KRun(KUrl(QDir::homePath()), QApplication::activeWindow(), 0, true, true);
if (currentUrl.isLocalFile()) {
new KRun(currentUrl, QApplication::activeWindow(), true);
} else {
new KRun(QUrl::fromLocalFile(QDir::homePath()), QApplication::activeWindow(), true);
}
}
void SessionController::copy()
......@@ -1381,7 +1387,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 +1399,7 @@ void SessionController::sessionTitleChanged()
{
if (_sessionIconName != _session->iconName()) {
_sessionIconName = _session->iconName();
_sessionIcon = KIcon(_sessionIconName);
_sessionIcon = QIcon::fromTheme(_sessionIconName);
updateSessionIcon();
}
......@@ -1484,10 +1490,10 @@ void SessionController::sessionStateChanged(int state)
return;
if (state == NOTIFYACTIVITY) {
setIcon(_activityIcon);
setIcon(*_activityIcon);
_keepIconUntilInteraction = true;
} else if (state == NOTIFYSILENCE) {
setIcon(_silenceIcon);
setIcon(*_silenceIcon);
_keepIconUntilInteraction = true;
} else if (state == NOTIFYNORMAL) {
if (_sessionIconName != _session->iconName()) {
......@@ -1509,7 +1515,7 @@ void SessionController::zmodemDownload()
}
if (!zmodem.isEmpty()) {
const QString path = KFileDialog::getExistingDirectory(
QString(), _view,
KUrl(), _view,
i18n("Save ZModem Download to..."));
if (!path.isEmpty()) {
......@@ -1598,7 +1604,7 @@ void SaveHistoryTask::execute()
// TODO - show a warning ( preferably passive ) if saving the history output fails
//
KFileDialog* dialog = new KFileDialog(QString(":konsole") /* check this */,
KFileDialog* dialog = new KFileDialog(KUrl(QString(":konsole")) /* check this */,
QString(), QApplication::activeWindow());
dialog->setOperationMode(KFileDialog::Saving);
dialog->setConfirmOverwrite(true);
......@@ -1612,7 +1618,7 @@ void SaveHistoryTask::execute()
// to save that session's history.
// then start a KIO job to transfer the data from the history to the chosen URL