summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@nokia.com>2011-05-20 10:45:56 (GMT)
committerLiang Qi <liang.qi@nokia.com>2011-05-20 12:28:14 (GMT)
commit96d10abbb40c52ac6274f1144766f3fb27dfd726 (patch)
tree538b26fd42a5d4517563958569709de023a4a052 /src/corelib/plugin
parentd56d7f107f9d18810d742ac4d3a2e36077722cb8 (diff)
downloadQt-96d10abbb40c52ac6274f1144766f3fb27dfd726.zip
Qt-96d10abbb40c52ac6274f1144766f3fb27dfd726.tar.gz
Qt-96d10abbb40c52ac6274f1144766f3fb27dfd726.tar.bz2
Optimize QUuid::QUuid(const char *)
Reviewed-by: joao
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/quuid.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index ddc388c..e07a1aa 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -342,7 +342,15 @@ QUuid::QUuid(const QString &text)
*/
QUuid::QUuid(const char *text)
{
- *this = QUuid(QString::fromLatin1(text));
+ if (!text) {
+ *this = QUuid();
+ return;
+ }
+
+ if (!_q_uuidFromHex(text, data1, data2, data3, data4)) {
+ *this = QUuid();
+ return;
+ }
}
/*!