Commit 5f005026 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Port KTextEdit/KDialog to QInputDialog::getMultiLineText

parent 5cc59399
......@@ -37,6 +37,7 @@
#include <QtCore/QUrl>
#include <QFontDialog>
#include <QFileDialog>
#include <QInputDialog>
#include <QDialog>
#include <QDebug>
// KDE
......@@ -330,25 +331,20 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr profile)
void EditProfileDialog::showEnvironmentEditor()
bool ok;
const Profile::Ptr profile = lookupProfile();
QWeakPointer<KDialog> dialog = new KDialog(this);
KTextEdit* edit = new KTextEdit(;
QStringList currentEnvironment = profile->environment();
edit->setToolTip(i18nc("@info:tooltip", "One environment variable per line"));>setPlainCaption(i18n("Edit Environment"));>setMainWidget(edit);
QString text = QInputDialog::getMultiLineText(this,
i18n("Edit Environment"),
i18n("One environment variable per line"),
if (>exec() == QDialog::Accepted) {
QStringList newEnvironment = edit->toPlainText().split('\n');
if (ok && !text.isEmpty()) {
QStringList newEnvironment = text.split('\n');
updateTempProfileProperty(Profile::Environment, newEnvironment);
void EditProfileDialog::setupTabsPage(const Profile::Ptr profile)
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