0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00

Qt version check has been added for console demo

This commit is contained in:
Arin Alexander 2019-02-20 21:37:32 +03:00
parent 0ca4366ad8
commit a010f2328c

View File

@ -18,6 +18,7 @@ int main(int argc, char *argv[])
QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR); QApplication::setApplicationVersion(LIMEREPORT_VERSION_STR);
QStringList vars; QStringList vars;
#if QT_VERSION > QT_VERSION_CHECK(5, 2, 0)
QCommandLineParser parser; QCommandLineParser parser;
parser.addHelpOption(); parser.addHelpOption();
parser.addVersionOption(); parser.addVersionOption();
@ -60,7 +61,9 @@ int main(int argc, char *argv[])
} else { } else {
report.printToPDF(parser.value(destinationOption)); report.printToPDF(parser.value(destinationOption));
} }
#else
std::cerr<<"This demo intended for Qt 5.2 and higher\n";
#endif
// QUuid uid = QUuid::createUuid(); // QUuid uid = QUuid::createUuid();
// QString uidStr = uid.toString()+".pdf"; // QString uidStr = uid.toString()+".pdf";
// report.printToPDF(uidStr); // report.printToPDF(uidStr);