summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-08-26 09:31:27 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-08-26 09:31:27 (GMT)
commit69354f37173b7bfcf7ea0f37175a34b8766afcbb (patch)
treed5d35fbb1c5b93470b6b1aa03c359ac09695055f /tools
parent065610d14fda00057724a46e2649db6bb98aca58 (diff)
parente5aa5a9d7e97b975316b8cc18554743cccf06474 (diff)
downloadQt-69354f37173b7bfcf7ea0f37175a34b8766afcbb.zip
Qt-69354f37173b7bfcf7ea0f37175a34b8766afcbb.tar.gz
Qt-69354f37173b7bfcf7ea0f37175a34b8766afcbb.tar.bz2
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: bin/syncqt src/opengl/qgl.cpp tools/configure/configureapp.cpp
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configure.pro2
-rw-r--r--tools/configure/configureapp.cpp16
-rw-r--r--tools/configure/environment.cpp7
-rw-r--r--tools/configure/tools.cpp10
4 files changed, 17 insertions, 18 deletions
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 73f3317..a3473af 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -28,7 +28,7 @@ INCLUDEPATH += \
$$QT_SOURCE_TREE/src/corelib/global \
$$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
- $$QT_BUILD_TREE/tools/shared
+ $$QT_SOURCE_TREE/tools/shared
HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/tools/qbytearray.h \
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 0c716d1..60502a0 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -341,7 +341,7 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "ACCESSIBILITY" ] = "yes";
dictionary[ "OPENGL" ] = "yes";
dictionary[ "OPENVG" ] = "no";
- dictionary[ "IPV6" ] = "yes"; // Always, dynamicly loaded
+ dictionary[ "IPV6" ] = "yes"; // Always, dynamically loaded
dictionary[ "OPENSSL" ] = "auto";
dictionary[ "DBUS" ] = "auto";
dictionary[ "S60" ] = "yes";
@@ -2149,7 +2149,7 @@ bool Configure::checkAvailability(const QString &part)
available = (paths.size() == 0);
if (!available) {
- if (epocRoot.isNull() || epocRoot == "")
+ if (epocRoot.isEmpty())
epocRoot = "<empty string>";
cout << endl
<< "The QtMultimedia audio backend will not be built because required" << endl
@@ -2695,7 +2695,7 @@ void Configure::generateOutputVars()
QString set_config = dictionary["QCONFIG"];
if (possible_configs.contains(set_config)) {
- foreach(QString cfg, possible_configs) {
+ foreach (const QString &cfg, possible_configs) {
qtConfig += (cfg + "-config");
if (cfg == set_config)
break;
@@ -2821,7 +2821,7 @@ void Configure::generateCachefile()
QStringList buildParts;
buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations";
- foreach(QString item, disabledBuildParts) {
+ foreach (const QString &item, disabledBuildParts) {
buildParts.removeAll(item);
}
cacheStream << "QT_BUILD_PARTS = " << buildParts.join(" ") << endl;
@@ -3134,7 +3134,7 @@ void Configure::generateConfigfiles()
QStringList kbdDrivers = dictionary["KBD_DRIVERS"].split(" ");;
QStringList allKbdDrivers;
allKbdDrivers<<"tty"<<"usb"<<"sl5000"<<"yopy"<<"vr41xx"<<"qvfb"<<"um";
- foreach(QString kbd, allKbdDrivers) {
+ foreach (const QString &kbd, allKbdDrivers) {
if (!kbdDrivers.contains(kbd))
tmpStream<<"#define QT_NO_QWS_KBD_"<<kbd.toUpper()<<endl;
}
@@ -3142,7 +3142,7 @@ void Configure::generateConfigfiles()
QStringList mouseDrivers = dictionary["MOUSE_DRIVERS"].split(" ");
QStringList allMouseDrivers;
allMouseDrivers << "pc"<<"bus"<<"linuxtp"<<"yopy"<<"vr41xx"<<"tslib"<<"qvfb";
- foreach(QString mouse, allMouseDrivers) {
+ foreach (const QString &mouse, allMouseDrivers) {
if (!mouseDrivers.contains(mouse))
tmpStream<<"#define QT_NO_QWS_MOUSE_"<<mouse.toUpper()<<endl;
}
@@ -3150,7 +3150,7 @@ void Configure::generateConfigfiles()
QStringList gfxDrivers = dictionary["GFX_DRIVERS"].split(" ");
QStringList allGfxDrivers;
allGfxDrivers<<"linuxfb"<<"transformed"<<"qvfb"<<"vnc"<<"multiscreen"<<"ahi";
- foreach(QString gfx, allGfxDrivers) {
+ foreach (const QString &gfx, allGfxDrivers) {
if (!gfxDrivers.contains(gfx))
tmpStream<<"#define QT_NO_QWS_"<<gfx.toUpper()<<endl;
}
@@ -3158,7 +3158,7 @@ void Configure::generateConfigfiles()
tmpStream<<"#define Q_WS_QWS"<<endl;
QStringList depths = dictionary[ "QT_QWS_DEPTH" ].split(" ");
- foreach(QString depth, depths)
+ foreach (const QString &depth, depths)
tmpStream<<"#define QT_QWS_DEPTH_"+depth<<endl;
}
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 943a8a2..03fd0cc 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -281,8 +281,7 @@ static QByteArray qt_create_environment(const QStringList &environment)
pos += tmpSize;
}
// add the user environment
- for (QStringList::ConstIterator it = environment.begin(); it != environment.end(); it++ ) {
- QString tmp = *it;
+ foreach (const QString &tmp, environment) {
uint tmpSize = sizeof(wchar_t) * (tmp.length() + 1);
envlist.resize(envlist.size() + tmpSize);
memcpy(envlist.data() + pos, tmp.utf16(), tmpSize);
@@ -386,7 +385,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
switch(GetLastError()) {
case E2BIG:
cerr << "execute: Argument list exceeds 1024 bytes" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
case ENOENT:
@@ -400,7 +399,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
break;
default:
cerr << "execute: Unknown error" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
}
diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp
index c4625af..c91f048 100644
--- a/tools/configure/tools.cpp
+++ b/tools/configure/tools.cpp
@@ -91,8 +91,8 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
QStringList components = buffer.split( '=' );
if ( components.size() >= 2 ) {
QStringList::Iterator it = components.begin();
- QString key = (*it++).trimmed().replace( "\"", QString() ).toUpper();
- QString value = (*it++).trimmed().replace( "\"", QString() );
+ QString key = (*it++).trimmed().remove('"').toUpper();
+ QString value = (*it++).trimmed().remove('"');
licenseInfo[ key ] = value;
}
}
@@ -111,7 +111,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
// Verify license info...
QString licenseKey = licenseInfo["LICENSEKEYEXT"];
QByteArray clicenseKey = licenseKey.toLatin1();
- //We check the licence
+ //We check the license
static const char * const SEP = "-";
char *licenseParts[NUMBER_OF_PARTS];
int partNumber = 0;
@@ -218,7 +218,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/.LICENSE")) {
// Generic, no-suffix license
- dictionary["LICENSE_EXTENSION"] = QString();
+ dictionary["LICENSE_EXTENSION"].clear();
} else if (dictionary["LICENSE_EXTENSION"].isEmpty()) {
cout << "License file does not contain proper license key." << endl;
dictionary["DONE"] = "error";
@@ -239,7 +239,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
fromLicenseFile += "-US";
if (!CopyFile((wchar_t*)QDir::toNativeSeparators(fromLicenseFile).utf16(),
- (wchar_t*)QDir::toNativeSeparators(toLicenseFile).utf16(), FALSE)) {
+ (wchar_t*)QDir::toNativeSeparators(toLicenseFile).utf16(), false)) {
cout << "Failed to copy license file (" << fromLicenseFile << ")";
dictionary["DONE"] = "error";
return;