cmake-gui: Remember variable type in Add Entry

Store variable types together with their names in the variable completion
list so that the type is automatically recovered when you select a variable.

Keep variable names and types in separate lists.  This removes the :TYPE
string from completion list and the Name field and makes variable search
easier.  The variable names and types are now kept in two different
settings - AddVariableNames and AddVariableTypes.  Drop the old
AddVariableCompletionEntries setting.
This commit is contained in:
Sergey Zolotarev
2014-01-13 17:28:16 +07:00
committed by Brad King
parent 9f6b633f37
commit cfec180d66
4 changed files with 62 additions and 16 deletions
+10 -1
View File
@@ -24,12 +24,21 @@ class AddCacheEntry : public QWidget, public Ui::AddCacheEntry
{
Q_OBJECT
public:
AddCacheEntry(QWidget* p, const QStringList& completions);
AddCacheEntry(QWidget* p, const QStringList& varNames,
const QStringList& varTypes);
QString name() const;
QVariant value() const;
QString description() const;
QCMakeProperty::PropertyType type() const;
QString typeString() const;
private slots:
void onCompletionActivated(const QString &text);
private:
const QStringList& VarNames;
const QStringList& VarTypes;
};
#endif