diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/bootstrap/bootstrap.pri | 2 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pro | 9 | ||||
-rw-r--r-- | src/tools/rcc/rcc.cpp | 40 | ||||
-rw-r--r-- | src/tools/uic/cpp/cppwriteinitialization.cpp | 11 | ||||
-rw-r--r-- | src/tools/uic/customwidgetsinfo.cpp | 8 | ||||
-rw-r--r-- | src/tools/uic/customwidgetsinfo.h | 2 | ||||
-rw-r--r-- | src/tools/uic/uic.cpp | 5 | ||||
-rw-r--r-- | src/tools/uic/uic.h | 1 | ||||
-rw-r--r-- | src/tools/uic3/uic.cpp | 5 | ||||
-rw-r--r-- | src/tools/uic3/uic.h | 1 |
10 files changed, 37 insertions, 47 deletions
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index b4f9b2f..b3ee948 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -38,7 +38,7 @@ DEPENDPATH += $$INCLUDEPATH \ $$QT_SOURCE_TREE/src/xml hpux-acc*|hpuxi-acc* { - LIBS += ../bootstrap/libbootstrap.a + LIBS += $$QT_BUILD_TREE/src/tools/bootstrap/libbootstrap.a } else { contains(CONFIG, debug_and_release_target) { CONFIG(debug, debug|release) { diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 1f81a6c..722981c 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -31,6 +31,7 @@ win32:DEFINES += QT_NODLL INCLUDEPATH += $$QT_BUILD_TREE/include \ $$QT_BUILD_TREE/include/QtCore \ $$QT_BUILD_TREE/include/QtXml \ + $$QT_BUILD_TREE/src/corelib/global # qlibraryinfo.cpp includes qconfig.cpp DEPENDPATH += $$INCLUDEPATH \ ../../corelib/global \ @@ -48,10 +49,12 @@ SOURCES += \ ../../corelib/codecs/qtsciicodec.cpp \ ../../corelib/codecs/qutfcodec.cpp \ ../../corelib/global/qglobal.cpp \ + ../../corelib/global/qlibraryinfo.cpp \ ../../corelib/global/qmalloc.cpp \ ../../corelib/global/qnumeric.cpp \ ../../corelib/io/qabstractfileengine.cpp \ ../../corelib/io/qbuffer.cpp \ + ../../corelib/io/qdatastream.cpp \ ../../corelib/io/qdir.cpp \ ../../corelib/io/qdiriterator.cpp \ ../../corelib/io/qfile.cpp \ @@ -62,6 +65,7 @@ SOURCES += \ ../../corelib/io/qtemporaryfile.cpp \ ../../corelib/io/qtextstream.cpp \ ../../corelib/io/qurl.cpp \ + ../../corelib/io/qsettings.cpp \ ../../corelib/kernel/qmetatype.cpp \ ../../corelib/kernel/qvariant.cpp \ ../../corelib/tools/qbitarray.cpp \ @@ -86,11 +90,12 @@ unix:SOURCES += ../../corelib/io/qfsfileengine_unix.cpp \ ../../corelib/io/qfsfileengine_iterator_unix.cpp win32:SOURCES += ../../corelib/io/qfsfileengine_win.cpp \ - ../../corelib/io/qfsfileengine_iterator_win.cpp + ../../corelib/io/qfsfileengine_iterator_win.cpp \ + ../../corelib/io/qsettings_win.cpp macx: { QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4 #enables weak linking for 10.4 (exported) - SOURCES += ../../corelib/kernel/qcore_mac.cpp + SOURCES += ../../corelib/kernel/qcore_mac.cpp ../../corelib/io/qsettings_mac.cpp LIBS += -framework CoreServices } diff --git a/src/tools/rcc/rcc.cpp b/src/tools/rcc/rcc.cpp index 51f850a..6b3227a 100644 --- a/src/tools/rcc/rcc.cpp +++ b/src/tools/rcc/rcc.cpp @@ -709,46 +709,6 @@ bool RCCResourceLibrary::writeHeader() { if (m_format == C_Code) { writeString("/****************************************************************************\n"); - writeString("**\n"); - writeString("** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n"); - writeString("** All rights reserved.\n"); - writeString("** Contact: Nokia Corporation (qt-info@nokia.com)\n"); - writeString("**\n"); - writeString("** This file is part of the tools applications of the Qt Toolkit.\n"); - writeString("**\n"); - writeString("** $QT_BEGIN_LICENSE:LGPL$\n"); - writeString("** No Commercial Usage\n"); - writeString("** This file contains pre-release code and may not be distributed.\n"); - writeString("** You may use this file in accordance with the terms and conditions\n"); - writeString("** contained in the Technology Preview License Agreement accompanying\n"); - writeString("** this package.\n"); - writeString("**\n"); - writeString("** GNU Lesser General Public License Usage\n"); - writeString("** Alternatively, this file may be used under the terms of the GNU Lesser\n"); - writeString("** General Public License version 2.1 as published by the Free Software\n"); - writeString("** Foundation and appearing in the file LICENSE.LGPL included in the\n"); - writeString("** packaging of this file. Please review the following information to\n"); - writeString("** ensure the GNU Lesser General Public License version 2.1 requirements\n"); - writeString("** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n"); - writeString("**\n"); - writeString("** In addition, as a special exception, Nokia gives you certain additional\n"); - writeString("** rights. These rights are described in the Nokia Qt LGPL Exception\n"); - writeString("** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n"); - writeString("**\n"); - writeString("** If you have questions regarding the use of this file, please contact\n"); - writeString("** Nokia at qt-info@nokia.com.\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("**\n"); - writeString("** $QT_END_LICENSE$\n"); - writeString("**\n"); - writeString("****************************************************************************/\n"); - writeString("/****************************************************************************\n"); writeString("** Resource object code\n"); writeString("**\n"); writeString("** Created: "); diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 1690c2e..b2e8f4f 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -670,10 +670,13 @@ void WriteInitialization::acceptWidget(DomWidget *node) m_layoutWidget = false; if (className == QLatin1String("QWidget") && !node->hasAttributeNative()) { - if (m_widgetChain.top() - && m_widgetChain.top()->attributeClass() != QLatin1String("QMainWindow") - && !m_uic->isContainer(m_widgetChain.top()->attributeClass())) + if (const DomWidget* parentWidget = m_widgetChain.top()) { + const QString parentClass = parentWidget->attributeClass(); + if (parentClass != QLatin1String("QMainWindow") + && !m_uic->isCustomWidgetContainer(parentClass) + && !m_uic->isContainer(parentClass)) m_layoutWidget = true; + } } m_widgetChain.push(node); m_layoutChain.push(0); @@ -718,7 +721,7 @@ void WriteInitialization::acceptWidget(DomWidget *node) m_output << m_indent << parentWidget << "->addDockWidget(" << area << varName << ");\n"; } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"))) { m_output << m_indent << parentWidget << "->setStatusBar(" << varName << ");\n"; - } else if (className == QLatin1String("QWidget")) { + } else { m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; } } diff --git a/src/tools/uic/customwidgetsinfo.cpp b/src/tools/uic/customwidgetsinfo.cpp index 70adba2..ca3fd19 100644 --- a/src/tools/uic/customwidgetsinfo.cpp +++ b/src/tools/uic/customwidgetsinfo.cpp @@ -88,6 +88,14 @@ bool CustomWidgetsInfo::extends(const QString &classNameIn, const QLatin1String return false; } +bool CustomWidgetsInfo::isCustomWidgetContainer(const QString &className) const +{ + if (const DomCustomWidget *dcw = m_customWidgets.value(className, 0)) + if (dcw->hasElementContainer()) + return dcw->elementContainer() != 0; + return false; +} + QString CustomWidgetsInfo::realClassName(const QString &className) const { if (className == QLatin1String("Line")) diff --git a/src/tools/uic/customwidgetsinfo.h b/src/tools/uic/customwidgetsinfo.h index 1471118..d5be5a2 100644 --- a/src/tools/uic/customwidgetsinfo.h +++ b/src/tools/uic/customwidgetsinfo.h @@ -78,6 +78,8 @@ public: bool extends(const QString &className, const QLatin1String &baseClassName) const; + bool isCustomWidgetContainer(const QString &className) const; + private: typedef QMap<QString, DomCustomWidget*> NameCustomWidgetMap; NameCustomWidgetMap m_customWidgets; diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp index 32e5e3d..71b6ac1 100644 --- a/src/tools/uic/uic.cpp +++ b/src/tools/uic/uic.cpp @@ -363,6 +363,11 @@ bool Uic::isContainer(const QString &className) const || customWidgetsInfo()->extends(className, QLatin1String("QDockWidget")); } +bool Uic::isCustomWidgetContainer(const QString &className) const +{ + return customWidgetsInfo()->isCustomWidgetContainer(className); +} + bool Uic::isStatusBar(const QString &className) const { return customWidgetsInfo()->extends(className, QLatin1String("QStatusBar")); diff --git a/src/tools/uic/uic.h b/src/tools/uic/uic.h index 3e072a4..5175ea9 100644 --- a/src/tools/uic/uic.h +++ b/src/tools/uic/uic.h @@ -115,6 +115,7 @@ public: bool isStatusBar(const QString &className) const; bool isButton(const QString &className) const; bool isContainer(const QString &className) const; + bool isCustomWidgetContainer(const QString &className) const; bool isMenuBar(const QString &className) const; bool isMenu(const QString &className) const; diff --git a/src/tools/uic3/uic.cpp b/src/tools/uic3/uic.cpp index 7872866..6761eaf 100644 --- a/src/tools/uic3/uic.cpp +++ b/src/tools/uic3/uic.cpp @@ -322,6 +322,11 @@ bool Uic::isContainer(const QString &className) const || customWidgetsInfo()->extends(className, QLatin1String("QDockWidget")); } +bool Uic::isCustomWidgetContainer(const QString &className) const +{ + return customWidgetsInfo()->isCustomWidgetContainer(className); +} + bool Uic::isStatusBar(const QString &className) const { return customWidgetsInfo()->extends(className, QLatin1String("QStatusBar")); diff --git a/src/tools/uic3/uic.h b/src/tools/uic3/uic.h index 50aa71c..63a1f8d 100644 --- a/src/tools/uic3/uic.h +++ b/src/tools/uic3/uic.h @@ -114,6 +114,7 @@ public: bool isStatusBar(const QString &className) const; bool isButton(const QString &className) const; bool isContainer(const QString &className) const; + bool isCustomWidgetContainer(const QString &className) const; bool isMenuBar(const QString &className) const; bool isMenu(const QString &className) const; |