Commit 8d3c1cfb authored by hjk's avatar hjk
Browse files

Rename FancyLineEdit::setHistoryKey -> setHistoryCompleter



similar for HistoryCompleter *m_completer -> m_historyCompleter

Change-Id: Ic7aedc19cbb865f0a5bdddb9565a7411fd06dfde
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 96d80096
......@@ -113,12 +113,12 @@ public:
IconButton *m_iconbutton[2];
bool m_iconEnabled[2];
HistoryCompleter *m_completer;
HistoryCompleter *m_historyCompleter;
};
FancyLineEditPrivate::FancyLineEditPrivate(FancyLineEdit *parent) :
QObject(parent), m_lineEdit(parent), m_completer(0)
QObject(parent), m_lineEdit(parent), m_historyCompleter(0)
{
for (int i = 0; i < 2; ++i) {
m_menu[i] = 0;
......@@ -302,16 +302,16 @@ bool FancyLineEdit::hasAutoHideButton(Side side) const
return d->m_iconbutton[side]->hasAutoHide();
}
void FancyLineEdit::setHistoryKey(const QString &historyKey)
void FancyLineEdit::setHistoryCompleter(const QString &historyKey)
{
QTC_ASSERT(!d->m_completer, return);
d->m_completer = new HistoryCompleter(this, historyKey);
QLineEdit::setCompleter(d->m_completer);
QTC_ASSERT(!d->m_historyCompleter, return);
d->m_historyCompleter = new HistoryCompleter(this, historyKey);
QLineEdit::setCompleter(d->m_historyCompleter);
}
void FancyLineEdit::setSpecialCompleter(QCompleter *completer)
{
QTC_ASSERT(!d->m_completer, return);
QTC_ASSERT(!d->m_historyCompleter, return);
QLineEdit::setCompleter(completer);
}
......
......@@ -95,7 +95,7 @@ public:
bool hasAutoHideButton(Side side) const;
// Enable a history completer with a history of entries.
void setHistoryKey(const QString &historyKey);
void setHistoryCompleter(const QString &historyKey);
// Sets a completer that is not a history completer.
void setSpecialCompleter(QCompleter *completer);
......
......@@ -296,7 +296,7 @@ void CMakeRunPage::initWidgets()
// Run CMake Line (with arguments)
m_argumentsLineEdit = new Utils::FancyLineEdit(this);
m_argumentsLineEdit->setHistoryKey(QLatin1String("CMakeArgumentsLineEdit"));
m_argumentsLineEdit->setHistoryCompleter(QLatin1String("CMakeArgumentsLineEdit"));
connect(m_argumentsLineEdit,SIGNAL(returnPressed()), this, SLOT(runCMake()));
fl->addRow(tr("Arguments:"), m_argumentsLineEdit);
......
......@@ -90,7 +90,7 @@ class StartApplicationDialogPrivate
public:
ProfileChooser *profileChooser;
PathChooser *localExecutablePathChooser;
QLineEdit *arguments;
FancyLineEdit *arguments;
PathChooser *workingDirectory;
QCheckBox *breakAtMainCheckBox;
QCheckBox *runInTerminalCheckBox;
......@@ -213,16 +213,15 @@ StartApplicationDialog::StartApplicationDialog(QWidget *parent)
d->localExecutablePathChooser = new PathChooser(this);
d->localExecutablePathChooser->setExpectedKind(PathChooser::File);
d->localExecutablePathChooser->setPromptDialogTitle(tr("Select Executable"));
d->localExecutablePathChooser->lineEdit()->setHistoryKey(QLatin1String("LocalExecutable"));
d->localExecutablePathChooser->lineEdit()->setHistoryCompleter(QLatin1String("LocalExecutable"));
d->arguments = new QLineEdit(this);
d->arguments->setCompleter(
new HistoryCompleter(d->arguments, QLatin1String("CommandlineArguments")));
d->arguments = new FancyLineEdit(this);
d->arguments->setHistoryCompleter(QLatin1String("CommandlineArguments"));
d->workingDirectory = new PathChooser(this);
d->workingDirectory->setExpectedKind(PathChooser::ExistingDirectory);
d->workingDirectory->setPromptDialogTitle(tr("Select Working Directory"));
d->workingDirectory->lineEdit()->setHistoryKey(QLatin1String("WorkingDirectory"));
d->workingDirectory->lineEdit()->setHistoryCompleter(QLatin1String("WorkingDirectory"));
d->runInTerminalCheckBox = new QCheckBox(this);
......@@ -654,11 +653,11 @@ bool AddressDialog::isValid() const
class StartRemoteEngineDialogPrivate
{
public:
QLineEdit *host;
QLineEdit *username;
FancyLineEdit *host;
FancyLineEdit *username;
QLineEdit *password;
QLineEdit *enginePath;
QLineEdit *inferiorPath;
FancyLineEdit *enginePath;
FancyLineEdit *inferiorPath;
QDialogButtonBox *buttonBox;
};
......@@ -668,21 +667,20 @@ StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Remote Engine"));
d->host = new QLineEdit(this);
d->host->setText(QString());
d->host->setCompleter(new HistoryCompleter(d->host, QLatin1String("HostName")));
d->host = new FancyLineEdit(this);
d->host->setHistoryCompleter(QLatin1String("HostName"));
d->username = new QLineEdit(this);
d->username->setCompleter(new HistoryCompleter(d->username, QLatin1String("UserName")));
d->username = new FancyLineEdit(this);
d->username->setHistoryCompleter(QLatin1String("UserName"));
d->password = new QLineEdit(this);
d->password->setEchoMode(QLineEdit::Password);
d->enginePath = new QLineEdit(this);
d->enginePath->setCompleter(new HistoryCompleter(d->enginePath, QLatin1String("EnginePath")));
d->enginePath = new FancyLineEdit(this);
d->enginePath->setHistoryCompleter(QLatin1String("EnginePath"));
d->inferiorPath = new QLineEdit(this);
d->inferiorPath->setCompleter(new HistoryCompleter(d->inferiorPath, QLatin1String("InferiorPath")));
d->inferiorPath = new FancyLineEdit(this);
d->inferiorPath->setHistoryCompleter(QLatin1String("InferiorPath"));
d->buttonBox = new QDialogButtonBox(this);
d->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
......
......@@ -343,7 +343,7 @@ LogWindow::LogWindow(QWidget *parent)
m_commandLabel = new QLabel(tr("Command:"), this);
m_commandEdit = new Utils::FancyLineEdit(this);
m_commandEdit->setFrame(false);
m_commandEdit->setHistoryKey(QLatin1String("DebuggerInput"));
m_commandEdit->setHistoryCompleter(QLatin1String("DebuggerInput"));
QHBoxLayout *commandBox = new QHBoxLayout;
commandBox->addWidget(m_commandLabel);
commandBox->addWidget(m_commandEdit);
......
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