summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <[email protected]>2016-05-28 17:33:19 -0400
committerKurt Hindenburg <[email protected]>2016-05-28 17:33:19 -0400
commit5014e385e169a1bf63f6a1a630b932d62a2c0ef9 (patch)
tree4fffa547f0137926b691cb51d4fcf2a0a3659398
parent6e131487266700582e7b061c9eb6425d0000ad8d (diff)
Remove pragma and commented out lines about Profile's command completion
If a Profile command entry completion widget is needed in the future, consider using KlineEdit and KCompletion.
-rw-r--r--src/EditProfileDialog.cpp30
1 files changed, 2 insertions, 28 deletions
diff --git a/src/EditProfileDialog.cpp b/src/EditProfileDialog.cpp
index f91832e..495eb72 100644
--- a/src/EditProfileDialog.cpp
+++ b/src/EditProfileDialog.cpp
@@ -267,34 +267,8 @@ void EditProfileDialog::setupGeneralPage(const Profile::Ptr profile)
ShellCommand command(profile->command() , profile->arguments());
_ui->commandEdit->setText(command.fullCommand());
-
-#pragma message("Look at this setCompletionObject again")
-// KUrlCompletion* exeCompletion = new KUrlCompletion(KUrlCompletion::ExeCompletion);
-// exeCompletion->setParent(this);
-// exeCompletion->setDir(QUrl());
-// _ui->commandEdit->setCompletionObject(exeCompletion);
-
-/* The below causes a noticeable delay when opening the dialog - I'm not entirely sure
- this is the best way to handle this.
- Issue is that QLineEdit->SetCompleter() won't work w/ KDE's KUrlCompletion
-
- QFileSystemModel *commandEditDirModel = new QFileSystemModel(this);
- commandEditDirModel->setFilter(QDir::AllEntries);
- QFileInfo commandFileInfo(profile->command());
- // If command is /usr/bin/zsh, start at /usr/bin for completion
- commandEditDirModel->setRootPath(commandFileInfo.absolutePath());
- QCompleter *commandEditCompleter = new QCompleter(this);
- commandEditCompleter->setModel(commandEditDirModel);
- _ui->commandEdit->setCompleter(commandEditCompleter);
-
- QFileSystemModel *initialEditDirModel = new QFileSystemModel(this);
- initialEditDirModel->setFilter(QDir::AllEntries);
- initialEditDirModel->setRootPath(QString('/'));
- _ui->initialDirEdit->setText(profile->defaultWorkingDirectory());
- QCompleter *initialDirCompleter = new QCompleter(this);
- initialDirCompleter->setModel(initialEditDirModel);
- _ui->initialDirEdit->setCompleter(initialDirCompleter);
-*/
+ // If a "completion" is requested, consider changing this to KLineEdit
+ // and using KCompletion.
_ui->initialDirEdit->setText(profile->defaultWorkingDirectory());
_ui->initialDirEdit->setClearButtonEnabled(true);