diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-29 16:10:12 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-29 16:10:12 (GMT) |
commit | 139235cfc51bcf152610747cfc09d72bdea081bd (patch) | |
tree | d9701819135f04ddfa64c210d7ba807e52cc72b3 /src/corelib | |
parent | a3504361a19428c12ac7e044762f252d8ba2b26f (diff) | |
parent | 65e0d7c3b63fc4c1d7df7603b926ca013794b321 (diff) | |
download | Qt-139235cfc51bcf152610747cfc09d72bdea081bd.zip Qt-139235cfc51bcf152610747cfc09d72bdea081bd.tar.gz Qt-139235cfc51bcf152610747cfc09d72bdea081bd.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into windows-7-multitouch
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.h | 7 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.h | 6 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 11 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 5 |
4 files changed, 24 insertions, 5 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 9298b49..3990c7d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -747,6 +747,10 @@ namespace QT_NAMESPACE {} # endif #elif defined(Q_OS_WINCE) # define Q_WS_WIN32 +# define Q_WS_WINCE +# if defined(Q_OS_WINCE_WM) +# define Q_WS_WINCE_WM +# endif #elif defined(Q_OS_OS2) # define Q_WS_PM # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" @@ -764,10 +768,11 @@ namespace QT_NAMESPACE {} # endif #endif -#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) +#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) || defined(Q_WS_WINCE) # define Q_WS_WIN #endif + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 15da2d6..ed44fa2 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -188,6 +188,12 @@ public: #endif }; + enum TileRule { + Stretch, + Repeat, + Round + }; + // Text formatting flags for QPainter::drawText and QLabel. // The following two enums can be combined to one integer which // is passed as 'flags' to drawText and qt_format_text. diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 522be20..63506c2 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -346,8 +346,15 @@ bool QFSFileEnginePrivate::uncListSharesOnServer(const QString &server, QStringL static bool isUncRoot(const QString &server) { QString localPath = QDir::toNativeSeparators(server); - QStringList parts = localPath.split(QLatin1Char('\\'), QString::SkipEmptyParts); - return localPath.startsWith(QLatin1String("\\\\")) && parts.count() <= 1; + if (!localPath.startsWith(QLatin1String("\\\\"))) + return false; + + int idx = localPath.indexOf(QLatin1Char('\\'), 2); + if (idx == -1 || idx + 1 == localPath.length()) + return true; + + localPath = localPath.right(localPath.length() - idx - 1).trimmed(); + return localPath.isEmpty(); } static bool isUncPath(const QString &path) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index ff59540..b53e91f 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2558,10 +2558,11 @@ static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] = bool QVariant::canConvert(Type t) const { //we can treat floats as double - //the reason for not doing it the "proper" way is that QMetaTye Float's value is 135, + //the reason for not doing it the "proper" way is that QMetaType::Float's value is 135, //which can't be handled by qCanConvertMatrix + //In addition QVariant::Type doesn't have a Float value, so we're using QMetaType::Float const uint currentType = ((d.type == QMetaType::Float) ? QVariant::Double : d.type); - if (t == QMetaType::Float) t = QVariant::Double; + if (uint(t) == uint(QMetaType::Float)) t = QVariant::Double; if (currentType == uint(t)) return true; |