[Cmake-commits] [cmake-commits] clinton committed QCMakeWidgets.cxx 1.1 1.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Dec 16 15:15:35 EST 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv32198
Modified Files:
QCMakeWidgets.cxx
Log Message:
ENH: Improve performance with file completion. Fix for #8292.
Index: QCMakeWidgets.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeWidgets.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** QCMakeWidgets.cxx 15 May 2008 23:21:01 -0000 1.1
--- QCMakeWidgets.cxx 16 Dec 2008 20:15:33 -0000 1.2
***************
*** 105,117 ****
}
! QCMakeFileCompleter::QCMakeFileCompleter(QObject* o, bool dirs)
! : QCompleter(o)
{
! QDirModel* model = new QDirModel(this);
! if(dirs)
{
! model->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot);
}
! this->setModel(model);
}
--- 105,134 ----
}
! // use same QDirModel for all completers
! static QDirModel* fileDirModel()
{
! static QDirModel* m = NULL;
! if(!m)
{
! m = new QDirModel();
}
! return m;
! }
! static QDirModel* pathDirModel()
! {
! static QDirModel* m = NULL;
! if(!m)
! {
! m = new QDirModel();
! m->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot);
! }
! return m;
! }
!
! QCMakeFileCompleter::QCMakeFileCompleter(QObject* o, bool dirs)
! : QCompleter(o)
! {
! QDirModel* m = dirs ? pathDirModel() : fileDirModel();
! this->setModel(m);
}
More information about the Cmake-commits
mailing list