Permalink
Browse files

Check Qt version at runtime

git-svn-id: https://svn.code.sf.net/p/qterm/code/trunk/qterm-qt4@1045 bd9efd21-7b0e-0410-bb59-ddbc1b2ac886
  • Loading branch information...
hephooey committed Dec 23, 2009
1 parent 54f2f42 commit 39dc4a31efe9c84eb4cd5f39dd9b8bf35fec0122
Showing with 4 additions and 0 deletions.
  1. +1 −0 config.h.cmake
  2. +3 −0 src/main.cpp
View
@@ -1 +1,2 @@
#define QTERM_VERSION "${QTERM_VERSION}"
+#define QT_MIN_VERSION "${QT_MIN_VERSION}"
View
@@ -127,6 +127,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
int main( int argc, char ** argv )
{
+ if ( strcmp( qVersion(), QT_MIN_VERSION ) < 0 ) {
+ qFatal("QTerm requires Qt %s or above to run! Qt installed in your system is %s.", QT_MIN_VERSION, qVersion());
+ }
QApplication::setGraphicsSystem("raster");
QApplication a( argc, argv );

0 comments on commit 39dc4a3

Please sign in to comment.