[cmake-commits] clinton committed QCMakeCacheView.cxx 1.22 1.23
CMakeSetup.cxx 1.13 1.14
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Feb 8 10:42:16 EST 2008
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv23579
Modified Files:
QCMakeCacheView.cxx CMakeSetup.cxx
Log Message:
COMP: Fix build with Qt 4.2.
BUG: Fix new editors stealing focus while typing search text.
ENH: Look for translation in data dir, not bin dir.
Index: CMakeSetup.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetup.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- CMakeSetup.cxx 6 Feb 2008 20:10:32 -0000 1.13
+++ CMakeSetup.cxx 8 Feb 2008 15:42:14 -0000 1.14
@@ -19,6 +19,7 @@
#include <QFileInfo>
#include <QDir>
#include <QTranslator>
+#include <QLocale>
#include "CMakeSetupDialog.h"
#include "cmDocumentation.h"
@@ -65,22 +66,29 @@
int main(int argc, char** argv)
{
QApplication app(argc, argv);
-
+
+ // tell the cmake library where cmake is
QDir cmExecDir(QApplication::applicationDirPath());
#if defined(Q_OS_MAC)
cmExecDir.cd("../../../");
#endif
cmSystemTools::FindExecutableDirectory(cmExecDir.filePath("cmake").toAscii().data());
+ // pick up translation files if they exists in the data directory
+ QDir translationsDir = cmExecDir;
+ translationsDir.cd(".." CMAKE_DATA_DIR);
+ translationsDir.cd("i18n");
QTranslator translator;
QString transfile = QString("cmake_%1").arg(QLocale::system().name());
- translator.load(transfile, app.applicationDirPath());
+ translator.load(transfile, translationsDir.path());
app.installTranslator(&translator);
+ // app setup
app.setApplicationName("CMakeSetup");
app.setOrganizationName("Kitware");
app.setWindowIcon(QIcon(":/Icons/CMakeSetup.png"));
+ // do docs, if args were given
cmDocumentation doc;
if(app.arguments().size() > 1 &&
doc.CheckOptions(app.argc(), app.argv()))
Index: QCMakeCacheView.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeCacheView.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- QCMakeCacheView.cxx 7 Feb 2008 22:58:57 -0000 1.22
+++ QCMakeCacheView.cxx 8 Feb 2008 15:42:14 -0000 1.23
@@ -146,6 +146,7 @@
void QCMakeCacheView::setSearchFilter(const QString& s)
{
+ this->selectionModel()->clear();
this->SearchFilter->setFilterFixedString(s);
}
More information about the Cmake-commits
mailing list