[cmake-commits] clinton committed QCMakeCacheView.cxx 1.12 1.13
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Nov 9 01:14:41 EST 2007
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv14100
Modified Files:
QCMakeCacheView.cxx
Log Message:
ENH: Add completion to editor for files and file paths.
Index: QCMakeCacheView.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeCacheView.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- QCMakeCacheView.cxx 8 Nov 2007 15:22:20 -0000 1.12
+++ QCMakeCacheView.cxx 9 Nov 2007 06:14:37 -0000 1.13
@@ -29,6 +29,8 @@
#include <QDialog>
#include <QLabel>
#include <QDialogButtonBox>
+#include <QDirModel>
+#include <QCompleter>
static QRegExp AdvancedRegExp[2] = { QRegExp("(false)"), QRegExp("(true|false)") };
@@ -438,6 +440,15 @@
this->ToolButton->setCursor(QCursor(Qt::ArrowCursor));
QObject::connect(this->ToolButton, SIGNAL(clicked(bool)),
this, SLOT(chooseFile()));
+ QCompleter* comp = new QCompleter(this);
+ QDirModel* model = new QDirModel(comp);
+ if(!fp)
+ {
+ // only dirs
+ model->setFilter(QDir::AllDirs | QDir::Drives);
+ }
+ comp->setModel(model);
+ this->setCompleter(comp);
}
void QCMakeCachePathEditor::resizeEvent(QResizeEvent* e)
More information about the Cmake-commits
mailing list