summaryrefslogtreecommitdiffstats
path: root/src/tools/uic
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-26 22:37:29 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-26 22:37:29 (GMT)
commite4026fee42b584c59db3f9f6d5acd2b4a08324d0 (patch)
tree1ffe768101ee9c361caf8fbc805e24f84a09e94f /src/tools/uic
parent0c893d56d449e49d5cc84dcb2dfc4e261f08172e (diff)
parent72c31196fdba0cd297ed42cb35959b4b305296c7 (diff)
downloadQt-e4026fee42b584c59db3f9f6d5acd2b4a08324d0.zip
Qt-e4026fee42b584c59db3f9f6d5acd2b4a08324d0.tar.gz
Qt-e4026fee42b584c59db3f9f6d5acd2b4a08324d0.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: skip the ipv6 Host checking for the moment, since it fails on Windows XP. will fix later remove duplicate message fix "Host" header of ipv6 URLs in QNAM uic: Use QString::fromUtf8 for QUrl properties. uic: #include <QLayout> for QToolBox on non-laid-out forms. add test case for ipv6 url parsing
Diffstat (limited to 'src/tools/uic')
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.cpp7
-rw-r--r--src/tools/uic/cpp/cppwriteincludes.h1
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp2
3 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/uic/cpp/cppwriteincludes.cpp b/src/tools/uic/cpp/cppwriteincludes.cpp
index 748d918..0be3385 100644
--- a/src/tools/uic/cpp/cppwriteincludes.cpp
+++ b/src/tools/uic/cpp/cppwriteincludes.cpp
@@ -82,7 +82,7 @@ static inline QString moduleHeader(const QString &module, const QString &header)
namespace CPP {
WriteIncludes::WriteIncludes(Uic *uic)
- : m_uic(uic), m_output(uic->output()), m_scriptsActivated(false)
+ : m_uic(uic), m_output(uic->output()), m_scriptsActivated(false), m_laidOut(false)
{
// When possible (no namespace) use the "QtModule/QClass" convention
// and create a re-mapping of the old header "qclass.h" to it. Do not do this
@@ -106,6 +106,7 @@ WriteIncludes::WriteIncludes(Uic *uic)
void WriteIncludes::acceptUI(DomUI *node)
{
m_scriptsActivated = false;
+ m_laidOut = false;
m_localIncludes.clear();
m_globalIncludes.clear();
m_knownClasses.clear();
@@ -160,6 +161,7 @@ void WriteIncludes::acceptWidget(DomWidget *node)
void WriteIncludes::acceptLayout(DomLayout *node)
{
add(node->attributeClass());
+ m_laidOut = true;
TreeWalker::acceptLayout(node);
}
@@ -236,6 +238,9 @@ void WriteIncludes::add(const QString &className, bool determineHeader, const QS
m_knownClasses.insert(className);
+ if (!m_laidOut && m_uic->customWidgetsInfo()->extends(className, QLatin1String("QToolBox")))
+ add(QLatin1String("QLayout")); // spacing property of QToolBox)
+
if (className == QLatin1String("Line")) { // ### hmm, deprecate me!
add(QLatin1String("QFrame"));
return;
diff --git a/src/tools/uic/cpp/cppwriteincludes.h b/src/tools/uic/cpp/cppwriteincludes.h
index 39b1ddf..e821536 100644
--- a/src/tools/uic/cpp/cppwriteincludes.h
+++ b/src/tools/uic/cpp/cppwriteincludes.h
@@ -107,6 +107,7 @@ private:
StringMap m_oldHeaderToNewHeader;
bool m_scriptsActivated;
+ bool m_laidOut;
};
} // namespace CPP
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index 06d054b..cd8c96c 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -1527,7 +1527,7 @@ void WriteInitialization::writeProperties(const QString &varName,
case DomProperty::Url: {
const DomUrl* u = p->elementUrl();
- propertyValue = QString::fromLatin1("QUrl(%1)")
+ propertyValue = QString::fromLatin1("QUrl(QString::fromUtf8(%1))")
.arg(fixString(u->elementString()->text(), m_dindent));
break;
}