summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-09-08 16:27:12 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-09-08 16:27:12 (GMT)
commit3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400 (patch)
tree05c11c5636d44b7e8afaa5982cc48fe2eb45726d /src/corelib
parent260005374b9b930aa583cd117aba96f8f4b34131 (diff)
parent2a1e82452a192c88bcf0250f5976492f6dc3b65f (diff)
downloadQt-3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400.zip
Qt-3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400.tar.gz
Qt-3b4400e9a8a4cc1851344b057d4c4f0bcfcc0400.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Split CFLAGS from pkg-config properly Ensure that the proxystyle is used over the style's own functions runonphone: Add a missing space between a message and the file name Perl check for windows configure. QSettings: don't assume XDG_CONFIG_HOME is latin1-encoded QSettings: use the common appdata dir when bootstrapping qmake on win Replace explicit surrogate handlers by inline methods of QChar class
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/codecs/qutfcodec.cpp8
-rw-r--r--src/corelib/io/qsettings.cpp14
2 files changed, 8 insertions, 14 deletions
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index f59f404..aaebec3 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -90,8 +90,8 @@ QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conve
while (ch < end) {
uint u = ch->unicode();
if (surrogate_high >= 0) {
- if (u >= 0xdc00 && u < 0xe000) {
- u = (surrogate_high - 0xd800)*0x400 + (u - 0xdc00) + 0x10000;
+ if (ch->isLowSurrogate()) {
+ u = QChar::surrogateToUcs4(surrogate_high, u);
surrogate_high = -1;
} else {
// high surrogate without low
@@ -101,13 +101,13 @@ QByteArray QUtf8::convertFromUnicode(const QChar *uc, int len, QTextCodec::Conve
surrogate_high = -1;
continue;
}
- } else if (u >= 0xdc00 && u < 0xe000) {
+ } else if (ch->isLowSurrogate()) {
// low surrogate without high
*cursor = replacement;
++ch;
++invalid;
continue;
- } else if (u >= 0xd800 && u < 0xdc00) {
+ } else if (ch->isHighSurrogate()) {
surrogate_high = u;
++ch;
continue;
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 79b2728..547bbeb 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -66,13 +66,12 @@
#ifndef QT_NO_QOBJECT
#include "qcoreapplication.h"
+#endif
#ifdef Q_OS_WIN // for homedirpath reading from registry
#include "qt_windows.h"
#include <private/qsystemlibrary_p.h>
-
-#endif // Q_OS_WIN
-#endif // QT_NO_QOBJECT
+#endif
#ifdef Q_OS_VXWORKS
# include <ioLib.h>
@@ -1024,9 +1023,6 @@ static QString windowsConfigPath(int type)
{
QString result;
-#ifndef QT_NO_QOBJECT
- // We can't use QLibrary if there is QT_NO_QOBJECT is defined
- // This only happens when bootstrapping qmake.
#ifndef Q_OS_WINCE
QSystemLibrary library(QLatin1String("shell32"));
#else
@@ -1040,8 +1036,6 @@ static QString windowsConfigPath(int type)
result = QString::fromWCharArray(path);
}
-#endif // QT_NO_QOBJECT
-
if (result.isEmpty()) {
switch (type) {
#ifndef Q_OS_WINCE
@@ -1114,11 +1108,11 @@ static void initDefaultPaths(QMutexLocker *locker)
userPath += QLatin1String(".config");
#endif
} else if (*env == '/') {
- userPath = QLatin1String(env);
+ userPath = QFile::decodeName(env);
} else {
userPath = homePath;
userPath += QLatin1Char('/');
- userPath += QLatin1String(env);
+ userPath += QFile::decodeName(env);
}
userPath += QLatin1Char('/');