diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-11-19 21:21:41 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-11-19 21:21:41 (GMT) |
commit | b0d01c306bd8dc6c636e65d38dc0d9e483568a67 (patch) | |
tree | 97bdc61a64fdbcfaa2057a4541f7c9324de15d1e /Source/QtDialog/AddCacheEntry.cxx | |
parent | 08c59af4dec0628964d9534ac165d75914bf580c (diff) | |
download | CMake-b0d01c306bd8dc6c636e65d38dc0d9e483568a67.zip CMake-b0d01c306bd8dc6c636e65d38dc0d9e483568a67.tar.gz CMake-b0d01c306bd8dc6c636e65d38dc0d9e483568a67.tar.bz2 |
cmake-gui: add completion for the names when adding cache entries
Up to 100 completion strings for the names of added variables
are saved in the settings, so it will remember the variables
you are usually adding.
It also ensures that CMAKE_INSTALL_PREFIX is always there, since
this is maybe the one which is set most often.
Alex
Diffstat (limited to 'Source/QtDialog/AddCacheEntry.cxx')
-rw-r--r-- | Source/QtDialog/AddCacheEntry.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx index 412d443..00aaf69 100644 --- a/Source/QtDialog/AddCacheEntry.cxx +++ b/Source/QtDialog/AddCacheEntry.cxx @@ -12,6 +12,7 @@ #include "AddCacheEntry.h" #include <QMetaProperty> +#include <QCompleter> static const int NumTypes = 4; static const QString TypeStrings[NumTypes] = @@ -20,7 +21,7 @@ static const QCMakeProperty::PropertyType Types[NumTypes] = { QCMakeProperty::BOOL, QCMakeProperty::PATH, QCMakeProperty::FILEPATH, QCMakeProperty::STRING}; -AddCacheEntry::AddCacheEntry(QWidget* p) +AddCacheEntry::AddCacheEntry(QWidget* p, const QStringList& completions) : QWidget(p) { this->setupUi(this); @@ -42,6 +43,7 @@ AddCacheEntry::AddCacheEntry(QWidget* p) this->setTabOrder(path, filepath); this->setTabOrder(filepath, string); this->setTabOrder(string, this->Description); + this->Name->setCompleter(new QCompleter(completions, this)); } QString AddCacheEntry::name() const |