Commit 45cf2ade authored by Clinton Stimpson's avatar Clinton Stimpson
Browse files

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.
parent a71d5609
......@@ -19,6 +19,7 @@
#include <QFileInfo>
#include <QDir>
#include <QTranslator>
#include <QLocale>
#include "CMakeSetupDialog.h"
#include "cmDocumentation.h"
......@@ -65,22 +66,29 @@ static const char * cmDocumentationOptions[][3] =
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)"../../../");
// pick up translation files if they exists in the data directory
QDir translationsDir = cmExecDir;".." CMAKE_DATA_DIR);"i18n");
QTranslator translator;
QString transfile = QString("cmake_%1").arg(QLocale::system().name());
translator.load(transfile, app.applicationDirPath());
translator.load(transfile, translationsDir.path());
// app setup
// do docs, if args were given
cmDocumentation doc;
if(app.arguments().size() > 1 &&
doc.CheckOptions(app.argc(), app.argv()))
......@@ -146,6 +146,7 @@ bool QCMakeCacheView::showAdvanced() const
void QCMakeCacheView::setSearchFilter(const QString& s)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment