Browse Source

Enforce Qt 5.2.0 as our new minimum floor during build.

Remove runtime checks for < that.
tags/gpsbabel_1_5_4
Robert Lipe 3 years ago
parent
commit
4b29fdc956
3 changed files with 4 additions and 18 deletions
  1. 2
    7
      gui/main.cc
  2. 0
    4
      gui/upgrade.cc
  3. 2
    7
      main.cc

+ 2
- 7
gui/main.cc View File

@@ -44,13 +44,8 @@ const char *pathSeparator = ":";
//------------------------------------------------------------------------
int main(int argc, char**argv)
{
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
// Qt 5.0 uses QString::fromUtf8 to convert from character pointers
// and QBytreArrays to QStrings while previous version of Qt used
// QString::fromAscii. QString::fromAscii used the codec set
// by QTextCode::setCodecForCStrings.
// This makes the conversion consistent between Qt4 and Qt5.
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0))
#error this version of Qt is not supported.
#endif

QApplication *app;

+ 0
- 4
gui/upgrade.cc View File

@@ -304,11 +304,7 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply)
QUrl downloadUrl;
updateStatus_ = updateCurrent; // Current until proven guilty.

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
for (int i = 0; i < (int) upgrades.length(); i++) {
#else
for (int i = 0; i < upgrades.length(); i++) {
#endif
QDomNode upgradeNode = upgrades.item(i);
QDomElement upgrade = upgradeNode.toElement();


+ 2
- 7
main.cc View File

@@ -252,13 +252,8 @@ main(int argc, char* argv[])

(void) new gpsbabel::UsAsciiCodec(); /* make sure a US-ASCII codec is available */

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
// Qt 5.0 uses QString::fromUtf8 to convert from character pointers
// and QBytreArrays to QStrings while previous version of Qt used
// QString::fromAscii. QString::fromAscii used the codec set
// by QTextCode::setCodecForCStrings.
// This makes the converstion consistent between Qt4 and Qt5.
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
#if (QT_VERSION < QT_VERSION_CHECK(5, 2, 0))
#error This version of Qt is not supported.
#endif

// The first invocation of QTextCodec::codecForLocale() may result in LC_ALL being set to the native environment

Loading…
Cancel
Save