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