summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/embedded/styledemo/stylewidget.ui333
-rw-r--r--doc/src/platforms/compiler-notes.qdoc14
-rw-r--r--doc/src/qt4-intro.qdoc5
-rw-r--r--examples/opengl/hellogl/glwidget.cpp12
-rw-r--r--examples/opengl/hellogl/main.cpp10
-rw-r--r--examples/opengl/hellogl/window.cpp8
-rw-r--r--examples/opengl/hellogl/window.h3
-rw-r--r--examples/opengl/opengl.pro3
-rw-r--r--examples/opengl/shared/qtlogo.cpp6
-rw-r--r--examples/opengl/shared/qtlogo.h2
-rw-r--r--qmake/generators/metamakefile.cpp14
-rw-r--r--qmake/generators/metamakefile.h2
-rw-r--r--qmake/main.cpp5
-rw-r--r--src/3rdparty/phonon/phonon/objectdescriptionmodel.h23
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp15
-rw-r--r--src/gui/dialogs/qprintdialog_mac.mm6
-rw-r--r--src/gui/egl/qeglproperties.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp53
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h6
-rw-r--r--src/gui/itemviews/qheaderview.cpp4
-rw-r--r--src/gui/kernel/qapplication_mac.mm26
-rw-r--r--src/gui/kernel/qkeymapper_win.cpp4
-rw-r--r--src/gui/kernel/qwidget.cpp3
-rw-r--r--src/gui/kernel/qwidget_s60.cpp11
-rw-r--r--src/gui/painting/qpen.cpp14
-rw-r--r--src/gui/styles/qplastiquestyle.cpp2
-rw-r--r--src/gui/styles/qs60style.cpp11
-rw-r--r--src/gui/text/qfontengine_mac.mm7
-rw-r--r--src/gui/widgets/qabstractslider.cpp3
-rw-r--r--src/network/access/qnetworkrequest.cpp30
-rw-r--r--src/network/access/qnetworkrequest.h3
-rw-r--r--src/network/access/qnetworkrequest_p.h2
-rw-r--r--src/network/kernel/qhostinfo_unix.cpp40
-rw-r--r--src/network/kernel/qhostinfo_win.cpp40
-rw-r--r--src/opengl/qgl_egl.cpp2
-rw-r--r--src/opengl/qglframebufferobject.cpp2
-rw-r--r--src/opengl/qglpixelbuffer_egl.cpp15
-rw-r--r--src/s60installs/eabi/phononu.def20
-rw-r--r--tests/auto/qabstractslider/tst_qabstractslider.cpp18
-rw-r--r--tests/auto/qbuttongroup/tst_qbuttongroup.cpp2
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp2
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp8
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp6
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp3
-rw-r--r--tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp16
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp26
-rw-r--r--tests/auto/qspinbox/tst_qspinbox.cpp10
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp9
-rw-r--r--tests/auto/selftests/tst_selftests.cpp2
-rw-r--r--tools/qdoc3/codemarker.h2
-rw-r--r--tools/qdoc3/cppcodeparser.cpp6
-rw-r--r--tools/qdoc3/htmlgenerator.cpp417
-rw-r--r--tools/qdoc3/htmlgenerator.h59
-rw-r--r--tools/qdoc3/node.cpp106
-rw-r--r--tools/qdoc3/node.h22
-rw-r--r--translations/translations.pri5
56 files changed, 903 insertions, 579 deletions
diff --git a/demos/embedded/styledemo/stylewidget.ui b/demos/embedded/styledemo/stylewidget.ui
index a084dde..767f44a 100644
--- a/demos/embedded/styledemo/stylewidget.ui
+++ b/demos/embedded/styledemo/stylewidget.ui
@@ -6,28 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
- <width>174</width>
- <height>220</height>
+ <width>184</width>
+ <height>245</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="spacing">
- <number>4</number>
- </property>
- <property name="margin">
- <number>4</number>
- </property>
- <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<property name="title">
<string>Styles</string>
</property>
@@ -141,7 +129,7 @@
</layout>
</widget>
</item>
- <item>
+ <item row="1" column="0" colspan="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -154,156 +142,137 @@
</property>
</spacer>
</item>
- <item>
- <widget class="QFrame" name="frame">
+ <item row="2" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="margin">
+ <number>4</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Value:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBox">
+ <property name="focusPolicy">
+ <enum>Qt::WheelFocus</enum>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ <property name="keyboardTracking">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="3" column="0">
+ <widget class="QScrollBar" name="horizontalScrollBar">
<property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>24</height>
+ </size>
</property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
+ <property name="focusPolicy">
+ <enum>Qt::TabFocus</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QScrollBar" name="horizontalScrollBar_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::TabFocus</enum>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <layout class="QVBoxLayout" name="frameLayout">
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>My Value is:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="spinBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::WheelFocus</enum>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="keyboardTracking">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout">
- <property name="spacing">
- <number>4</number>
- </property>
- <item row="0" column="0">
- <widget class="QScrollBar" name="horizontalScrollBar">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>24</height>
- </size>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QPushButton" name="pushButton_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="text">
- <string>Show</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QScrollBar" name="horizontalScrollBar_2">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>24</height>
- </size>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QPushButton" name="pushButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="text">
- <string>Enable</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
</widget>
</item>
- <item>
+ <item row="4" column="0">
+ <widget class="QPushButton" name="pushButton_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="text">
+ <string>Show</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QPushButton" name="pushButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="text">
+ <string>Enable</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -319,32 +288,28 @@
</property>
</spacer>
</item>
- <item>
- <layout class="QHBoxLayout">
- <item>
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="close">
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="text">
- <string>Close</string>
- </property>
- </widget>
- </item>
- </layout>
+ <item row="6" column="0">
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="6" column="1">
+ <widget class="QPushButton" name="close">
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
</item>
</layout>
</widget>
diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc
index 5b5240a..4577bf0 100644
--- a/doc/src/platforms/compiler-notes.qdoc
+++ b/doc/src/platforms/compiler-notes.qdoc
@@ -204,10 +204,22 @@
\section2 Sun Studio
- Qt is tested using Sun Studio 8 (Sun CC 5.5). Go to
+ Qt is tested using Sun Studio 12 (Sun CC 5.9). Go to
\l{Sun Studio Patches} page on Sun's Web site to download
the latest patches for your Sun compiler.
+ Please note that Qt 4.6 is stricter in its STL requirements and
+ that the default STL implementation used by Sun CC does not pass
+ those requirements. This does not affect binary compatibility and
+ you can continue to use STL in your own code, but Qt's
+ STL-compatibility functions will be disabled.
+
+ Sun CC ships with a secondary STL implementation (called stlport4)
+ which is standards-compliant and can be used by Qt. You can enable
+ it by passing the -library=stlport4 option to the compiler. Note
+ that this does not affect Qt's binary compatibility, but it may
+ affect that of other libraries and programs that use STL.
+
\section2 Sun WorkShop 5.0
Sun WorkShop 5.0 is not supported with Qt 4.
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 6224cd4..38f346f 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -661,10 +661,9 @@
See the \l{QtMultimedia Module} documentation for more information.
- \section1 Classes, functions, and other items introduced in 4.6
+ \section1 Classes, functions, etc new in 4.6
- Links to classes, function, and other items that were added in
- 4.6.
+ Links to classes, functions, and other items that are new in 4.6.
\sincelist 4.6
diff --git a/examples/opengl/hellogl/glwidget.cpp b/examples/opengl/hellogl/glwidget.cpp
index 282f21f..ffb3b15 100644
--- a/examples/opengl/hellogl/glwidget.cpp
+++ b/examples/opengl/hellogl/glwidget.cpp
@@ -150,10 +150,10 @@ void GLWidget::paintGL()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
- glTranslated(0.0, 0.0, -10.0);
- glRotated(xRot / 16.0, 1.0, 0.0, 0.0);
- glRotated(yRot / 16.0, 0.0, 1.0, 0.0);
- glRotated(zRot / 16.0, 0.0, 0.0, 1.0);
+ glTranslatef(0.0, 0.0, -10.0);
+ glRotatef(xRot / 16.0, 1.0, 0.0, 0.0);
+ glRotatef(yRot / 16.0, 0.0, 1.0, 0.0);
+ glRotatef(zRot / 16.0, 0.0, 0.0, 1.0);
logo->draw();
}
//! [7]
@@ -166,7 +166,11 @@ void GLWidget::resizeGL(int width, int height)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
+#ifdef QT_OPENGL_ES_1
+ glOrthof(-0.5, +0.5, -0.5, +0.5, 4.0, 15.0);
+#else
glOrtho(-0.5, +0.5, -0.5, +0.5, 4.0, 15.0);
+#endif
glMatrixMode(GL_MODELVIEW);
}
//! [8]
diff --git a/examples/opengl/hellogl/main.cpp b/examples/opengl/hellogl/main.cpp
index e645dba..f610b3b 100644
--- a/examples/opengl/hellogl/main.cpp
+++ b/examples/opengl/hellogl/main.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include <QApplication>
+#include <QDesktopWidget>
#include "window.h"
@@ -47,6 +48,13 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Window window;
- window.show();
+ window.resize(window.sizeHint());
+ int desktopArea = QApplication::desktop()->width() *
+ QApplication::desktop()->height();
+ int widgetArea = window.width() * window.height();
+ if (((float)widgetArea / (float)desktopArea) < 0.75f)
+ window.show();
+ else
+ window.showMaximized();
return app.exec();
}
diff --git a/examples/opengl/hellogl/window.cpp b/examples/opengl/hellogl/window.cpp
index 2b06b9c..19a8aac 100644
--- a/examples/opengl/hellogl/window.cpp
+++ b/examples/opengl/hellogl/window.cpp
@@ -88,3 +88,11 @@ QSlider *Window::createSlider()
return slider;
}
//! [2]
+
+void Window::keyPressEvent(QKeyEvent *e)
+{
+ if (e->key() == Qt::Key_Escape)
+ close();
+ else
+ QWidget::keyPressEvent(e);
+}
diff --git a/examples/opengl/hellogl/window.h b/examples/opengl/hellogl/window.h
index 7269a05..4cfd31b 100644
--- a/examples/opengl/hellogl/window.h
+++ b/examples/opengl/hellogl/window.h
@@ -57,6 +57,9 @@ class Window : public QWidget
public:
Window();
+protected:
+ void keyPressEvent(QKeyEvent *event);
+
private:
QSlider *createSlider();
diff --git a/examples/opengl/opengl.pro b/examples/opengl/opengl.pro
index 2cb8227..eaac9b8 100644
--- a/examples/opengl/opengl.pro
+++ b/examples/opengl/opengl.pro
@@ -9,6 +9,9 @@ contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles1cl)|contains(QT_CONF
!contains(QT_CONFIG, opengles1cl) {
SUBDIRS += textures
}
+ contains(QT_CONFIG, opengles1) {
+ SUBDIRS += hellogl
+ }
} else {
SUBDIRS = 2dpainting \
grabber \
diff --git a/examples/opengl/shared/qtlogo.cpp b/examples/opengl/shared/qtlogo.cpp
index b32b416..bad83d1 100644
--- a/examples/opengl/shared/qtlogo.cpp
+++ b/examples/opengl/shared/qtlogo.cpp
@@ -39,6 +39,12 @@
**
****************************************************************************/
+#include <QGLWidget>
+#include <QMatrix4x4>
+#include <QVector3D>
+
+#include <qmath.h>
+
#include "qtlogo.h"
static const qreal tee_height = 0.311126;
diff --git a/examples/opengl/shared/qtlogo.h b/examples/opengl/shared/qtlogo.h
index 4f5c357..152958b 100644
--- a/examples/opengl/shared/qtlogo.h
+++ b/examples/opengl/shared/qtlogo.h
@@ -43,7 +43,7 @@
#define QTLOGO_H
#include <QObject>
-#include <QtOpenGL>
+#include <QColor>
class Patch;
struct Geometry;
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 3acb2dd..69dd627 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -291,7 +291,7 @@ SubdirsMetaMakefileGenerator::init()
if(init_flag)
return false;
init_flag = true;
- bool hasError = false;
+
if(Option::recursive) {
QString old_output_dir = Option::output_dir;
QString old_output = Option::output.fileName();
@@ -336,7 +336,7 @@ SubdirsMetaMakefileGenerator::init()
}
qmake_setpwd(sub->input_dir);
Option::output_dir = sub->output_dir;
- hasError |= !sub_proj->read(subdir.fileName());
+ sub_proj->read(subdir.fileName());
if(!sub_proj->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
fprintf(stderr, "Project file(%s) not recursed because all requirements not met:\n\t%s\n",
subdir.fileName().toLatin1().constData(),
@@ -351,7 +351,7 @@ SubdirsMetaMakefileGenerator::init()
} else {
const QString output_name = Option::output.fileName();
Option::output.setFileName(sub->output_file);
- hasError |= !sub->makefile->write(sub->output_dir);
+ sub->makefile->write(sub->output_dir);
delete sub;
qmakeClearCaches();
sub = 0;
@@ -376,7 +376,7 @@ SubdirsMetaMakefileGenerator::init()
self->makefile->init();
subs.append(self);
- return !hasError;
+ return true;
}
bool
@@ -745,7 +745,7 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
}
MetaMakefileGenerator *
-MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op, bool *success)
+MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &name, bool op)
{
MetaMakefileGenerator *ret = 0;
if ((Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
@@ -758,9 +758,7 @@ MetaMakefileGenerator::createMetaGenerator(QMakeProject *proj, const QString &na
}
if (!ret)
ret = new BuildsMetaMakefileGenerator(proj, name, op);
- bool res = ret->init();
- if (success)
- *success = res;
+ ret->init();
return ret;
}
diff --git a/qmake/generators/metamakefile.h b/qmake/generators/metamakefile.h
index f74f4a2..e69304a 100644
--- a/qmake/generators/metamakefile.h
+++ b/qmake/generators/metamakefile.h
@@ -62,7 +62,7 @@ public:
virtual ~MetaMakefileGenerator();
- static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true, bool *success = 0);
+ static MetaMakefileGenerator *createMetaGenerator(QMakeProject *proj, const QString &name, bool op=true);
static MakefileGenerator *createMakefileGenerator(QMakeProject *proj, bool noIO = false);
inline QMakeProject *projectFile() const { return project; }
diff --git a/qmake/main.cpp b/qmake/main.cpp
index 8117a4c..73fdda9 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -168,10 +168,7 @@ int runQMake(int argc, char **argv)
continue;
}
- bool success = true;
- MetaMakefileGenerator *mkfile = MetaMakefileGenerator::createMetaGenerator(&project, QString(), false, &success);
- if (!success)
- exit_val = 3;
+ MetaMakefileGenerator *mkfile = MetaMakefileGenerator::createMetaGenerator(&project, QString(), false);
if(mkfile && !mkfile->write(oldpwd)) {
if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
fprintf(stderr, "Unable to generate project file.\n");
diff --git a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
index ba3cb42..a3c72b2 100644
--- a/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
+++ b/src/3rdparty/phonon/phonon/objectdescriptionmodel.h
@@ -139,6 +139,21 @@ namespace Phonon
ObjectDescriptionModelDataPrivate *const d;
};
+/* Required to ensure template class vtables are exported on both symbian
+and existing builds. */
+#if defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT)
+// RVCT compiler (2.2.686) requires the export declaration to be on the class to export vtables
+// MWC compiler works both ways
+// GCCE compiler is unknown (it can't compile QtCore yet)
+#define PHONON_TEMPLATE_CLASS_EXPORT PHONON_EXPORT
+#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT
+#else
+// Windows builds (at least) do not support export declaration on templated class
+// But if you export a member function, the vtable is implicitly exported
+#define PHONON_TEMPLATE_CLASS_EXPORT
+#define PHONON_TEMPLATE_CLASS_MEMBER_EXPORT PHONON_EXPORT
+#endif
+
/** \class ObjectDescriptionModel objectdescriptionmodel.h Phonon/ObjectDescriptionModel
* \short The ObjectDescriptionModel class provides a model from
* a list of ObjectDescription objects.
@@ -175,7 +190,7 @@ namespace Phonon
* \author Matthias Kretz <kretz@kde.org>
*/
template<ObjectDescriptionType type>
- class ObjectDescriptionModel : public QAbstractListModel
+ class PHONON_TEMPLATE_CLASS_EXPORT ObjectDescriptionModel : public QAbstractListModel
{
public:
Q_OBJECT_CHECK
@@ -188,11 +203,11 @@ namespace Phonon
*/
#if !defined(Q_CC_MINGW) || __MINGW32_MAJOR_VERSION >= 4
/** \internal */
- static PHONON_EXPORT const QMetaObject staticMetaObject;
+ static PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject staticMetaObject;
/** \internal */
- PHONON_EXPORT const QMetaObject *metaObject() const;
+ PHONON_TEMPLATE_CLASS_MEMBER_EXPORT const QMetaObject *metaObject() const;
/** \internal */
- PHONON_EXPORT void *qt_metacast(const char *_clname);
+ PHONON_TEMPLATE_CLASS_MEMBER_EXPORT void *qt_metacast(const char *_clname);
//int qt_metacall(QMetaObject::Call _c, int _id, void **_a);
#endif
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 114da3b..b0cddaa 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1255,8 +1255,19 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, QFile::MemoryMapFla
int realOffset = offset / pagesSize;
int extra = offset % pagesSize;
- void *mapAddress = mmap((void*)0, (size_t)size + extra,
- access, MAP_SHARED, nativeHandle(), realOffset * pagesSize);
+#ifdef Q_OS_SYMBIAN
+ void *mapAddress;
+ TRAPD(err, mapAddress = mmap((void*)0, (size_t)size + extra,
+ access, MAP_SHARED, nativeHandle(), realOffset * pagesSize));
+ if (err != KErrNone) {
+ qWarning("OpenC bug: leave from mmap %d", err);
+ mapAddress = MAP_FAILED;
+ errno = EINVAL;
+ }
+#else
+ void *mapAddress = mmap((void*)0, (size_t)size + extra,
+ access, MAP_SHARED, nativeHandle(), realOffset * pagesSize);
+#endif
if (MAP_FAILED != mapAddress) {
uchar *address = extra + static_cast<uchar*>(mapAddress);
maps[address] = QPair<int,int>(extra, size);
diff --git a/src/gui/dialogs/qprintdialog_mac.mm b/src/gui/dialogs/qprintdialog_mac.mm
index a7587b1..667fc40 100644
--- a/src/gui/dialogs/qprintdialog_mac.mm
+++ b/src/gui/dialogs/qprintdialog_mac.mm
@@ -166,6 +166,12 @@ QT_USE_NAMESPACE
}
// Keep us in sync with file output
PMDestinationType dest;
+
+ // If the user selected print to file, the session has been
+ // changed behind our back and our d->ep->session object is a
+ // dangling pointer. Update it based on the "current" session
+ d->ep->session = static_cast<PMPrintSession>([d->ep->printInfo PMPrintSession]);
+
PMSessionGetDestinationType(d->ep->session, d->ep->settings, &dest);
if (dest == kPMDestinationFile) {
QCFType<CFURLRef> file;
diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp
index 02ae729..c61e1d3 100644
--- a/src/gui/egl/qeglproperties.cpp
+++ b/src/gui/egl/qeglproperties.cpp
@@ -313,7 +313,7 @@ QString QEglProperties::toString() const
int alpha = value(EGL_ALPHA_SIZE);
int bufferSize = value(EGL_BUFFER_SIZE);
if (bufferSize == (red + green + blue + alpha))
- bufferSize = EGL_DONT_CARE;
+ bufferSize = 0;
str += QLatin1String(" rgba=");
str += QString::number(red);
str += QLatin1Char(',');
@@ -322,7 +322,7 @@ QString QEglProperties::toString() const
str += QString::number(blue);
str += QLatin1Char(',');
str += QString::number(alpha);
- if (bufferSize != EGL_DONT_CARE) {
+ if (bufferSize != 0) {
// Only report buffer size if different than r+g+b+a.
str += QLatin1String(" buffer-size=");
str += QString::number(bufferSize);
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index e3cd4f9..f9b5c8c 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -275,8 +275,8 @@ static qreal getFactor(qreal value, qreal min, qreal pref, qreal max)
}
}
-static qreal getExpandingFactor(qreal expSize, qreal sizeAtPreferred,
- qreal sizeAtExpanding, qreal sizeAtMaximum)
+static qreal getExpandingFactor(const qreal &expSize, const qreal &sizeAtPreferred,
+ const qreal &sizeAtExpanding, const qreal &sizeAtMaximum)
{
const qreal lower = qMin(sizeAtPreferred, sizeAtMaximum);
const qreal upper = qMax(sizeAtPreferred, sizeAtMaximum);
@@ -1842,10 +1842,10 @@ void QGraphicsAnchorLayoutPrivate::findPaths(Orientation orientation)
}
}
- // We will walk through every reachable items (non-float) and mark them
- // by keeping their references on m_nonFloatItems. With this we can easily
- // identify non-float and float items.
- identifyNonFloatItems(visited, orientation);
+ // We will walk through every reachable items (non-float) store them in a temporary set.
+ // We them create a set of all items and subtract the non-floating items from the set in
+ // order to get the floating items. The floating items is then stored in m_floatItems
+ identifyFloatItems(visited, orientation);
}
/*!
@@ -2008,14 +2008,20 @@ QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation)
Use all visited Anchors on findPaths() so we can identify non-float Items.
*/
-void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems(QSet<AnchorData *> visited, Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::identifyFloatItems(const QSet<AnchorData *> &visited, Orientation orientation)
{
- m_nonFloatItems[orientation].clear();
+ QSet<QGraphicsLayoutItem *> nonFloating;
foreach (const AnchorData *ad, visited)
- identifyNonFloatItems_helper(ad, orientation);
+ identifyNonFloatItems_helper(ad, &nonFloating);
+
+ QSet<QGraphicsLayoutItem *> allItems;
+ foreach (QGraphicsLayoutItem *item, items)
+ allItems.insert(item);
+ m_floatItems[orientation] = allItems - nonFloating;
}
+
/*!
\internal
@@ -2023,22 +2029,22 @@ void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems(QSet<AnchorData *> visi
If the anchor is Sequential or Parallel, we must iterate on its children recursively until we reach
internal anchors (items).
*/
-void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems_helper(const AnchorData *ad, Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems_helper(const AnchorData *ad, QSet<QGraphicsLayoutItem *> *nonFloatingItemsIdentifiedSoFar)
{
Q_Q(QGraphicsAnchorLayout);
switch(ad->type) {
case AnchorData::Normal:
if (ad->from->m_item == ad->to->m_item && ad->to->m_item != q)
- m_nonFloatItems[orientation].insert(ad->to->m_item);
+ nonFloatingItemsIdentifiedSoFar->insert(ad->to->m_item);
break;
case AnchorData::Sequential:
foreach (const AnchorData *d, static_cast<const SequentialAnchorData *>(ad)->m_edges)
- identifyNonFloatItems_helper(d, orientation);
+ identifyNonFloatItems_helper(d, nonFloatingItemsIdentifiedSoFar);
break;
case AnchorData::Parallel:
- identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->firstEdge, orientation);
- identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->secondEdge, orientation);
+ identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->firstEdge, nonFloatingItemsIdentifiedSoFar);
+ identifyNonFloatItems_helper(static_cast<const ParallelAnchorData *>(ad)->secondEdge, nonFloatingItemsIdentifiedSoFar);
break;
}
}
@@ -2070,7 +2076,10 @@ void QGraphicsAnchorLayoutPrivate::setItemsGeometries(const QRectF &geom)
foreach (QGraphicsLayoutItem *item, items) {
QRectF newGeom;
QSizeF itemPreferredSize = item->effectiveSizeHint(Qt::PreferredSize);
- if (m_nonFloatItems[Horizontal].contains(item)) {
+ if (m_floatItems[Horizontal].contains(item)) {
+ newGeom.setLeft(0);
+ newGeom.setRight(itemPreferredSize.width());
+ } else {
firstH = internalVertex(item, Qt::AnchorLeft);
secondH = internalVertex(item, Qt::AnchorRight);
@@ -2081,20 +2090,17 @@ void QGraphicsAnchorLayoutPrivate::setItemsGeometries(const QRectF &geom)
newGeom.setLeft(right - secondH->distance);
newGeom.setRight(right - firstH->distance);
}
- } else {
- newGeom.setLeft(0);
- newGeom.setRight(itemPreferredSize.width());
}
- if (m_nonFloatItems[Vertical].contains(item)) {
+ if (m_floatItems[Vertical].contains(item)) {
+ newGeom.setTop(0);
+ newGeom.setBottom(itemPreferredSize.height());
+ } else {
firstV = internalVertex(item, Qt::AnchorTop);
secondV = internalVertex(item, Qt::AnchorBottom);
newGeom.setTop(top + firstV->distance);
newGeom.setBottom(top + secondV->distance);
- } else {
- newGeom.setTop(0);
- newGeom.setBottom(itemPreferredSize.height());
}
item->setGeometry(newGeom);
@@ -2554,8 +2560,7 @@ bool QGraphicsAnchorLayoutPrivate::hasConflicts() const
QGraphicsAnchorLayoutPrivate *that = const_cast<QGraphicsAnchorLayoutPrivate*>(this);
that->calculateGraphs();
- bool floatConflict = (m_nonFloatItems[0].size() < items.size())
- || (m_nonFloatItems[1].size() < items.size());
+ bool floatConflict = !m_floatItems[0].isEmpty() || !m_floatItems[1].isEmpty();
return graphHasConflicts[0] || graphHasConflicts[1] || floatConflict;
}
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index 24b25de..9ac0e19 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -443,8 +443,8 @@ public:
void constraintsFromPaths(Orientation orientation);
QList<QSimplexConstraint *> constraintsFromSizeHints(const QList<AnchorData *> &anchors);
QList<QList<QSimplexConstraint *> > getGraphParts(Orientation orientation);
- void identifyNonFloatItems(QSet<AnchorData *> visited, Orientation orientation);
- void identifyNonFloatItems_helper(const AnchorData *ad, Orientation orientation);
+ void identifyFloatItems(const QSet<AnchorData *> &visited, Orientation orientation);
+ void identifyNonFloatItems_helper(const AnchorData *ad, QSet<QGraphicsLayoutItem *> *nonFloatingItemsIdentifiedSoFar);
inline AnchorVertex *internalVertex(const QPair<QGraphicsLayoutItem*, Qt::AnchorPoint> &itemEdge) const
{
@@ -511,7 +511,7 @@ public:
// ###
bool graphSimplified[2];
bool graphHasConflicts[2];
- QSet<QGraphicsLayoutItem *> m_nonFloatItems[2];
+ QSet<QGraphicsLayoutItem *> m_floatItems[2];
uint calculateGraphCacheDirty : 1;
};
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index fc9820f..a754579 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -524,8 +524,10 @@ QSize QHeaderView::sizeHint() const
Q_D(const QHeaderView);
if (d->cachedSizeHint.isValid())
return d->cachedSizeHint;
- d->cachedSizeHint = QSize(0, 0); //reinitialize the cached size hint
+ int width = 0;
+ int height = 0;
const int sectionCount = count();
+ d->executePostedLayout();
// get size hint for the first n sections
int i = 0;
diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm
index a95ae9d..f9c8aa3 100644
--- a/src/gui/kernel/qapplication_mac.mm
+++ b/src/gui/kernel/qapplication_mac.mm
@@ -1708,12 +1708,30 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event
sizeof(axis), 0, &axis);
// The 'new' event has acceleration applied by the OS, while the old (on
- // Carbon only), has not. So we introduce acceleration here to be consistent:
- int scrollFactor = 120 * qMin(5, qAbs(mdelt));
+ // Carbon only), has not. So we introduce acceleration here to be consistent.
+ // The acceleration is trying to respect both pixel based and line scrolling,
+ // which turns out to be rather difficult.
+ int linesToScroll = mdelt > 0 ? 1 : -1;
+ static QTime t;
+ int elapsed = t.elapsed();
+ t.restart();
+ if (elapsed < 20)
+ linesToScroll *= 120;
+ else if (elapsed < 30)
+ linesToScroll *= 60;
+ else if (elapsed < 50)
+ linesToScroll *= 30;
+ else if (elapsed < 100)
+ linesToScroll *= 6;
+ else if (elapsed < 200)
+ linesToScroll *= 3;
+ else if (elapsed < 300)
+ linesToScroll *= 2;
+
if (axis == kEventMouseWheelAxisX)
- wheel_deltaX = mdelt * scrollFactor;
+ wheel_deltaX = linesToScroll * 120;
else
- wheel_deltaY = mdelt * scrollFactor;
+ wheel_deltaY = linesToScroll * 120;
}
}
diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp
index 10958f3..be207df 100644
--- a/src/gui/kernel/qkeymapper_win.cpp
+++ b/src/gui/kernel/qkeymapper_win.cpp
@@ -905,8 +905,8 @@ bool QKeyMapperPrivate::translateKeyEvent(QWidget *widget, const MSG &msg, bool
if(msg.wParam == VK_PROCESSKEY)
return true;
- // Ignore invalid virtual keycode (see bug 127424)
- if (msg.wParam == 0xFF)
+ // Ignore invalid virtual keycodes (see bugs 127424, QTBUG-3630)
+ if (msg.wParam == 0 || msg.wParam == 0xFF)
return true;
// Translate VK_* (native) -> Key_* (Qt) keys
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 4cbf762..56602f7 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -901,9 +901,8 @@ void QWidget::setAutoFillBackground(bool enabled)
\sa QEvent, QPainter, QGridLayout, QBoxLayout
\section1 Softkeys
- \since 4.6
- Softkeys are usually physical keys on a device that have a corresponding label or
+ Since Qt 4.6, Softkeys are usually physical keys on a device that have a corresponding label or
other visual representation on the screen that is generally located next to its
physical counterpart. They are most often found on mobile phone platforms. In
modern touch based user interfaces it is also possible to have softkeys that do
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 3328cee..b0d405a 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -434,7 +434,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de
void QWidgetPrivate::show_sys()
{
Q_Q(QWidget);
-
+
if (q->testAttribute(Qt::WA_OutsideWSRange))
return;
@@ -490,7 +490,12 @@ void QWidgetPrivate::hide_sys()
QSymbianControl *id = static_cast<QSymbianControl *>(q->internalWinId());
if (id) {
- if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged()
+ //Incorrect optimisation - for popup windows, Qt's focus is moved before
+ //hide_sys is called, resulting in the popup window keeping its elevated
+ //position in the CONE control stack.
+ //This can result in keyboard focus being in an invisible widget in some
+ //conditions - e.g. QTBUG-4733
+ //if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged()
id->setFocusSafely(false);
id->MakeVisible(false);
if (QWidgetBackingStore *bs = maybeBackingStore())
@@ -1253,7 +1258,7 @@ void QWidget::grabMouse()
WId id = effectiveWinId();
id->SetPointerCapture(true);
QWidgetPrivate::mouseGrabber = this;
-
+
#ifndef QT_NO_CURSOR
QApplication::setOverrideCursor(cursor());
#endif
diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp
index a050cb2..41efc80 100644
--- a/src/gui/painting/qpen.cpp
+++ b/src/gui/painting/qpen.cpp
@@ -411,6 +411,8 @@ Qt::PenStyle QPen::style() const
pattern using the setDashPattern() function which implicitly
converts the style of the pen to Qt::CustomDashLine.
+ \note This function resets the dash offset to zero.
+
\sa style(), {QPen#Pen Style}{Pen Style}
*/
@@ -420,7 +422,9 @@ void QPen::setStyle(Qt::PenStyle s)
return;
detach();
d->style = s;
- static_cast<QPenData *>(d)->dashPattern.clear();
+ QPenData *dd = static_cast<QPenData *>(d);
+ dd->dashPattern.clear();
+ dd->dashOffset = 0;
}
/*!
@@ -538,8 +542,12 @@ void QPen::setDashOffset(qreal offset)
if (qFuzzyCompare(offset, static_cast<QPenData *>(d)->dashOffset))
return;
detach();
- static_cast<QPenData *>(d)->dashOffset = offset;
- d->style = Qt::CustomDashLine;
+ QPenData *dd = static_cast<QPenData *>(d);
+ dd->dashOffset = offset;
+ if (d->style != Qt::CustomDashLine) {
+ dd->dashPattern = dashPattern();
+ d->style = Qt::CustomDashLine;
+ }
}
/*!
diff --git a/src/gui/styles/qplastiquestyle.cpp b/src/gui/styles/qplastiquestyle.cpp
index 5052755..ce2109a 100644
--- a/src/gui/styles/qplastiquestyle.cpp
+++ b/src/gui/styles/qplastiquestyle.cpp
@@ -3309,7 +3309,7 @@ void QPlastiqueStyle::drawControl(ControlElement element, const QStyleOption *op
// Draw the text centered
QFont font = painter->font();
- font.setPointSize(font.pointSize() - 1);
+ font.setPointSize(QFontInfo(font).pointSize() - 1);
painter->setFont(font);
painter->setPen(dockWidget->palette.windowText().color());
painter->drawText(titleRect,
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 6bdb79e..4fa1d03 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -706,11 +706,10 @@ void QS60StylePrivate::setThemePalette(QPalette *palette) const
palette->setColor(QPalette::AlternateBase, Qt::transparent);
palette->setBrush(QPalette::Base, Qt::transparent);
// set button and tooltipbase based on pixel colors
-// After natitive pixmap support, colorFromFrameGraphics caused reproducable crashes on some setups.
-// const QColor buttonColor = colorFromFrameGraphics(SF_ButtonNormal);
-// palette->setColor(QPalette::Button, buttonColor);
-// const QColor toolTipColor = colorFromFrameGraphics(SF_ToolTip);
-// palette->setColor(QPalette::ToolTipBase, toolTipColor);
+ const QColor buttonColor = colorFromFrameGraphics(SF_ButtonNormal);
+ palette->setColor(QPalette::Button, buttonColor);
+ const QColor toolTipColor = colorFromFrameGraphics(SF_ToolTip);
+ palette->setColor(QPalette::ToolTipBase, toolTipColor);
palette->setColor(QPalette::Light, palette->color(QPalette::Button).lighter());
palette->setColor(QPalette::Dark, palette->color(QPalette::Button).darker());
palette->setColor(QPalette::Midlight, palette->color(QPalette::Button).lighter(125));
@@ -1865,7 +1864,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
painter->save();
painter->setRenderHint(QPainter::Antialiasing);
painter->setOpacity(opacity);
- painter->setPen(QPen(option->palette.color(QPalette::Highlight), penWidth));
+ painter->setPen(QPen(option->palette.color(QPalette::Text), penWidth));
painter->drawRoundedRect(adjustedRect, roundRectRadius, roundRectRadius);
painter->restore();
}
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 40db7b4..758d8af 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -138,9 +138,10 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con
QCFString name;
ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name);
- QCFType<CTFontDescriptorRef> descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pointSize);
- QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pointSize, 0);
- ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pointSize, 0, symbolicTraits, symbolicTraits);
+
+ QCFType<CTFontDescriptorRef> descriptor = CTFontDescriptorCreateWithNameAndSize(name, fontDef.pixelSize);
+ QCFType<CTFontRef> baseFont = CTFontCreateWithFontDescriptor(descriptor, fontDef.pixelSize, 0);
+ ctfont = CTFontCreateCopyWithSymbolicTraits(baseFont, fontDef.pixelSize, 0, symbolicTraits, symbolicTraits);
// CTFontCreateCopyWithSymbolicTraits returns NULL if we ask for a trait that does
// not exist for the given font. (for example italic)
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index 19a8b63..588a48e 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -715,8 +715,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e)
#else
stepsToScroll = int(d->offset_accumulated) * QApplication::wheelScrollLines() * d->singleStep;
#endif
- if (qAbs(stepsToScroll) > d->pageStep)
- stepsToScroll = currentOffset > 0 ? d->pageStep : -d->pageStep;
+ stepsToScroll = qBound(-d->pageStep, stepsToScroll, d->pageStep);
}
if (d->invertedControls)
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index cde9858..33bc57b 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -481,6 +481,36 @@ void QNetworkRequest::setSslConfiguration(const QSslConfiguration &config)
}
#endif
+/*!
+ \since 4.6
+
+ Allows setting a reference to the \a object initiating
+ the request.
+
+ For example QtWebKit sets the originating object to the
+ QWebFrame that initiated the request.
+
+ \sa originatingObject()
+*/
+void QNetworkRequest::setOriginatingObject(QObject *object)
+{
+ d->originatingObject = object;
+}
+
+/*!
+ \since 4.6
+
+ Returns a reference to the object that initiated this
+ network request; returns 0 if not set or the object has
+ been destroyed.
+
+ \sa setOriginatingObject()
+*/
+QObject *QNetworkRequest::originatingObject() const
+{
+ return d->originatingObject.data();
+}
+
static QByteArray headerName(QNetworkRequest::KnownHeaders header)
{
switch (header) {
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index 7b15237..62c6dda 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -120,6 +120,9 @@ public:
void setSslConfiguration(const QSslConfiguration &configuration);
#endif
+ void setOriginatingObject(QObject *object);
+ QObject *originatingObject() const;
+
private:
QSharedDataPointer<QNetworkRequestPrivate> d;
friend class QNetworkRequestPrivate;
diff --git a/src/network/access/qnetworkrequest_p.h b/src/network/access/qnetworkrequest_p.h
index 22b239f..9b3632f 100644
--- a/src/network/access/qnetworkrequest_p.h
+++ b/src/network/access/qnetworkrequest_p.h
@@ -58,6 +58,7 @@
#include "QtCore/qlist.h"
#include "QtCore/qhash.h"
#include "QtCore/qshareddata.h"
+#include "QtCore/qsharedpointer.h"
QT_BEGIN_NAMESPACE
@@ -73,6 +74,7 @@ public:
RawHeadersList rawHeaders;
CookedHeadersMap cookedHeaders;
AttributesMap attributes;
+ QWeakPointer<QObject> originatingObject;
RawHeadersList::ConstIterator findRawHeader(const QByteArray &key) const;
QList<QByteArray> rawHeadersKeys() const;
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp
index b4ac3d2..7e6e522 100644
--- a/src/network/kernel/qhostinfo_unix.cpp
+++ b/src/network/kernel/qhostinfo_unix.cpp
@@ -173,38 +173,28 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
#endif
char hbuf[NI_MAXHOST];
- if (!sa || getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) != 0) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(hbuf));
+ if (sa && getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) == 0)
+ results.setHostName(QString::fromLatin1(hbuf));
#else
in_addr_t inetaddr = qt_safe_inet_addr(hostName.toLatin1().constData());
struct hostent *ent = gethostbyaddr((const char *)&inetaddr, sizeof(inetaddr), AF_INET);
- if (!ent) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(ent->h_name));
+ if (ent)
+ results.setHostName(QString::fromLatin1(ent->h_name));
#endif
+
+ if (results.hostName().isEmpty())
+ results.setHostName(address.toString());
+ results.setAddresses(QList<QHostAddress>() << address);
+ return results;
}
// IDN support
- QByteArray aceHostname;
- if (results.hostName().isEmpty()) {
- // it's a hostname resolution
- aceHostname = QUrl::toAce(hostName);
- results.setHostName(hostName);
- if (aceHostname.isEmpty()) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(hostName.isEmpty() ? QObject::tr("No host name given") : QObject::tr("Invalid hostname"));
- return results;
- }
- } else {
- // it's an IP reverse resolution
- aceHostname = results.hostName().toLatin1();
+ QByteArray aceHostname = QUrl::toAce(hostName);
+ results.setHostName(hostName);
+ if (aceHostname.isEmpty()) {
+ results.setError(QHostInfo::HostNotFound);
+ results.setErrorString(hostName.isEmpty() ? QObject::tr("No host name given") : QObject::tr("Invalid hostname"));
+ return results;
}
#if !defined (QT_NO_GETADDRINFO)
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index d9d7234..720aaa5 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -160,38 +160,28 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName)
}
char hbuf[NI_MAXHOST];
- if (local_getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) != 0) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(hbuf));
+ if (local_getnameinfo(sa, saSize, hbuf, sizeof(hbuf), 0, 0, 0) == 0)
+ results.setHostName(QString::fromLatin1(hbuf));
} else {
unsigned long addr = inet_addr(hostName.toLatin1().constData());
struct hostent *ent = gethostbyaddr((const char*)&addr, sizeof(addr), AF_INET);
- if (!ent) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(tr("Host not found"));
- return results;
- }
- results.setHostName(QString::fromLatin1(ent->h_name));
+ if (ent)
+ results.setHostName(QString::fromLatin1(ent->h_name));
}
+
+ if (results.hostName().isEmpty())
+ results.setHostName(address.toString());
+ results.setAddresses(QList<QHostAddress>() << address);
+ return results;
}
// IDN support
- QByteArray aceHostname;
- if (results.hostName().isEmpty()) {
- // it's a hostname resolution
- aceHostname = QUrl::toAce(hostName);
- results.setHostName(hostName);
- if (aceHostname.isEmpty()) {
- results.setError(QHostInfo::HostNotFound);
- results.setErrorString(hostName.isEmpty() ? tr("No host name given") : tr("Invalid hostname"));
- return results;
- }
- } else {
- // it's an IP reverse resolution
- aceHostname = results.hostName().toLatin1();
+ QByteArray aceHostname = QUrl::toAce(hostName);
+ results.setHostName(hostName);
+ if (aceHostname.isEmpty()) {
+ results.setError(QHostInfo::HostNotFound);
+ results.setErrorString(hostName.isEmpty() ? tr("No host name given") : tr("Invalid hostname"));
+ return results;
}
if (local_getaddrinfo && local_freeaddrinfo) {
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index fa876c7..fbf0349 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -75,7 +75,7 @@ void qt_egl_set_format(QEglProperties& props, int deviceType, const QGLFormat& f
props.setValue(EGL_STENCIL_SIZE, f.stencilBufferSize() == -1 ? 1 : f.stencilBufferSize());
if (f.sampleBuffers()) {
props.setValue(EGL_SAMPLE_BUFFERS, 1);
- props.setValue(EGL_SAMPLES, f.samples());
+ props.setValue(EGL_SAMPLES, f.samples() == -1 ? 1 : f.samples());
} else {
props.setValue(EGL_SAMPLE_BUFFERS, 0);
}
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index 3e54b35..5585208 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -988,7 +988,7 @@ QImage QGLFramebufferObject::toImage() const
bool wasBound = isBound();
if (!wasBound)
const_cast<QGLFramebufferObject *>(this)->bind();
- QImage image = qt_gl_read_framebuffer(d->size, format().textureTarget() != GL_RGB, true);
+ QImage image = qt_gl_read_framebuffer(d->size, format().internalTextureFormat() != GL_RGB, true);
if (!wasBound)
const_cast<QGLFramebufferObject *>(this)->release();
diff --git a/src/opengl/qglpixelbuffer_egl.cpp b/src/opengl/qglpixelbuffer_egl.cpp
index 4cba1bb..744fbd4 100644
--- a/src/opengl/qglpixelbuffer_egl.cpp
+++ b/src/opengl/qglpixelbuffer_egl.cpp
@@ -151,7 +151,7 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge
bool QGLPixelBufferPrivate::cleanup()
{
- eglDestroySurface(QEglContext::defaultDisplay(0), pbuf);
+ // No need to destroy "pbuf" here - it is done in QGLContext::reset().
return true;
}
@@ -202,13 +202,20 @@ GLuint QGLPixelBuffer::generateDynamicTexture() const
bool QGLPixelBuffer::hasOpenGLPbuffers()
{
// See if we have at least 1 configuration that matches the default format.
- QEglContext ctx;
- if (!ctx.openDisplay(0))
+ EGLDisplay dpy = QEglContext::defaultDisplay(0);
+ if (dpy == EGL_NO_DISPLAY)
return false;
QEglProperties configProps;
qt_egl_set_format(configProps, QInternal::Pbuffer, QGLFormat::defaultFormat());
configProps.setRenderableType(QEgl::OpenGL);
- return ctx.chooseConfig(configProps);
+ do {
+ EGLConfig cfg = 0;
+ EGLint matching = 0;
+ if (eglChooseConfig(dpy, configProps.properties(),
+ &cfg, 1, &matching) && matching > 0)
+ return true;
+ } while (configProps.reduceConfiguration());
+ return false;
}
QT_END_NAMESPACE
diff --git a/src/s60installs/eabi/phononu.def b/src/s60installs/eabi/phononu.def
index d407ba4..d70942c 100644
--- a/src/s60installs/eabi/phononu.def
+++ b/src/s60installs/eabi/phononu.def
@@ -495,11 +495,11 @@ EXPORTS
_ZTIN6Phonon19AbstractVideoOutputE @ 494 NONAME
_ZTIN6Phonon19BackendCapabilities8NotifierE @ 495 NONAME ABSENT
_ZTIN6Phonon22MediaControllerPrivateE @ 496 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 497 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 498 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 499 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 500 NONAME ABSENT
- _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 501 NONAME ABSENT
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 497 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 498 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 499 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 500 NONAME
+ _ZTIN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 501 NONAME
_ZTIN6Phonon24VolumeFaderEffectPrivateE @ 502 NONAME ABSENT
_ZTIN6Phonon26AbstractAudioOutputPrivateE @ 503 NONAME ABSENT
_ZTIN6Phonon26AbstractMediaStreamPrivateE @ 504 NONAME
@@ -532,11 +532,11 @@ EXPORTS
_ZTVN6Phonon19AbstractVideoOutputE @ 531 NONAME
_ZTVN6Phonon19BackendCapabilities8NotifierE @ 532 NONAME ABSENT
_ZTVN6Phonon22MediaControllerPrivateE @ 533 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 534 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 535 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 536 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 537 NONAME ABSENT
- _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 538 NONAME ABSENT
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EEE @ 534 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE1EEE @ 535 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE2EEE @ 536 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE3EEE @ 537 NONAME
+ _ZTVN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE4EEE @ 538 NONAME
_ZTVN6Phonon24VolumeFaderEffectPrivateE @ 539 NONAME ABSENT
_ZTVN6Phonon26AbstractAudioOutputPrivateE @ 540 NONAME ABSENT
_ZTVN6Phonon26AbstractMediaStreamPrivateE @ 541 NONAME
diff --git a/tests/auto/qabstractslider/tst_qabstractslider.cpp b/tests/auto/qabstractslider/tst_qabstractslider.cpp
index 9f7a78e..5c70bde 100644
--- a/tests/auto/qabstractslider/tst_qabstractslider.cpp
+++ b/tests/auto/qabstractslider/tst_qabstractslider.cpp
@@ -714,7 +714,11 @@ void tst_QAbstractSlider::wheelEvent_data()
<< 1 // delta
<< int(Qt::Vertical) // orientation of slider
<< int(Qt::Vertical) // orientation of wheel
+#ifdef Q_WS_MAC
+ << 1 // expected position after
+#else
<< 20 // expected position after
+#endif
<< QPoint(0,0);
QTest::newRow("Normal data page") << 0 // initial position
@@ -773,7 +777,11 @@ void tst_QAbstractSlider::wheelEvent_data()
<< 1 // delta
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Horizontal) // orientation of wheel
+#ifdef Q_WS_MAC
+ << 49 // expected position after
+#else
<< 30 // expected position after
+#endif
<< QPoint(1,1);
QTest::newRow("Past end") << 50 // initial position
@@ -784,7 +792,11 @@ void tst_QAbstractSlider::wheelEvent_data()
<< false // inverted controls
<< 1 // wheel scroll lines
<< false // with modifiers
+#ifdef Q_WS_MAC
+ << 60 // delta
+#else
<< 2 // delta
+#endif
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Horizontal) // orientation of wheel
<< 100 // expected position after
@@ -798,7 +810,11 @@ void tst_QAbstractSlider::wheelEvent_data()
<< false // inverted controls
<< 1 // wheel scroll lines
<< false // with modifiers
- << -2 // delta
+#ifdef Q_WS_MAC
+ << -60 // delta
+#else
+ << -2 // delta
+#endif
<< int(Qt::Horizontal) // orientation of slider
<< int(Qt::Horizontal) // orientation of wheel
<< 0 // expected position after
diff --git a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
index 11c1f47..a19f865 100644
--- a/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
+++ b/tests/auto/qbuttongroup/tst_qbuttongroup.cpp
@@ -406,7 +406,7 @@ void tst_QButtonGroup::task106609()
QTestEventLoop::instance().enterLoop(1);
QApplication::setActiveWindow(&dlg);
- QTRY_COMPARE(QApplication::activeWindow(), &dlg);
+ QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&dlg));
//qDebug() << "int:" << spy2.count() << "QAbstractButton*:" << spy1.count();
QCOMPARE(spy2.count(), 2);
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp
index f6b082f..dc2ca61 100644
--- a/tests/auto/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp
@@ -944,7 +944,7 @@ void tst_QFiledialog::selectFiles()
QVERIFY(listView);
for (int i = 0; i < list.count(); ++i) {
fd.selectFile(fd.directory().path() + "/" + list.at(i));
-#if defined(Q_WS_MAC) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
+#if defined(QT_MAC_USE_COCOA) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN)
QEXPECT_FAIL("", "This test does not work on Mac, Windows, or Symbian", Abort);
#endif
QTRY_VERIFY(!listView->selectionModel()->selectedRows().isEmpty());
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index 6c5fe90..0589994 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -2820,17 +2820,15 @@ void tst_QGraphicsScene::update2()
CustomView view;
view.setScene(&scene);
view.show();
-#ifdef Q_WS_X11
- qt_x11_wait_for_window_manager(&view);
-#endif
- QTest::qWait(250);
+ QTest::qWaitForWindowShown(&view);
+ QTRY_VERIFY(view.repaints >= 1);
view.repaints = 0;
// Make sure QGraphicsScene::update only requires one event-loop iteration
// before the view is updated.
scene.update();
qApp->processEvents();
- QCOMPARE(view.repaints, 1);
+ QTRY_COMPARE(view.repaints, 1);
view.repaints = 0;
// The same for partial scene updates.
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index e8979ea..b407fef 100644
--- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -159,7 +159,11 @@ void tst_QGraphicsTransform::scale()
// definitions correct for the difference.
static inline bool fuzzyCompare(qreal p1, qreal p2)
{
- return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2)));
+ // increase delta on small machines using float instead of double
+ if (sizeof(qreal) == sizeof(float))
+ return (qAbs(p1 - p2) <= 0.00002f * qMin(qAbs(p1), qAbs(p2)));
+ else
+ return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2)));
}
static bool fuzzyCompare(const QTransform& t1, const QTransform& t2)
{
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 726ca55..4eb149f 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -812,6 +812,9 @@ public:
void tst_QMenu::task258920_mouseBorder()
{
+#ifdef Q_OS_WINCE_WM
+ QSKIP("Mouse move related signals for Windows Mobile unavailable", SkipAll);
+#endif
Menu258920 menu;
QAction *action = menu.addAction("test");
diff --git a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp
index 3f9632c..2e21087 100644
--- a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp
+++ b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp
@@ -66,6 +66,7 @@ private slots:
void setHeader();
void rawHeaderParsing_data();
void rawHeaderParsing();
+ void originatingObject();
void removeHeader();
};
@@ -476,5 +477,20 @@ void tst_QNetworkRequest::removeHeader()
QVERIFY(request.hasRawHeader("bar"));
}
+void tst_QNetworkRequest::originatingObject()
+{
+ QNetworkRequest request;
+
+ QVERIFY(!request.originatingObject());
+
+ {
+ QObject dummy;
+ request.setOriginatingObject(&dummy);
+ QCOMPARE(request.originatingObject(), &dummy);
+ }
+
+ QVERIFY(!request.originatingObject());
+}
+
QTEST_MAIN(tst_QNetworkRequest)
#include "tst_qnetworkrequest.moc"
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 58eaacb..ed9206c 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -812,8 +812,14 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(baseptr.data() == aData);
QVERIFY(aData == baseptr.data());
- QVERIFY(bool(operator==<Data,DiffPtrDerivedData>(baseptr, aData)));
+
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(aData == baseptr);
}
check();
@@ -829,6 +835,9 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(ptr == baseptr);
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
}
check();
@@ -845,6 +854,9 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -865,6 +877,9 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -882,6 +897,9 @@ void tst_QSharedPointer::virtualBaseDifferentPointers()
QVERIFY(ptr.data() == baseptr.data());
QVERIFY(ptr == aBase);
QVERIFY(ptr == aData);
+#if defined(Q_CC_MSVC) && _MSC_VER < 1400
+ QEXPECT_FAIL("", "Compiler bug", Continue);
+#endif
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
@@ -1701,7 +1719,7 @@ void tst_QSharedPointer::invalidConstructs()
"struct DerivedData: public Data { int j; };\n"
"\n"
"extern int forwardDeclaredDestructorRunCount;\n"
- "struct ForwardDeclared;\n"
+ "class ForwardDeclared;\n"
"ForwardDeclared *forwardPointer();\n"
);
@@ -1730,6 +1748,10 @@ void tst_QSharedPointer::invalidConstructs()
bool result = (test.*testFunction)(body);
if (qgetenv("QTEST_EXTERNAL_DEBUG").toInt() > 0) {
qDebug("External test output:");
+#ifdef Q_CC_MSVC
+ // MSVC prints errors to stdout
+ printf("%s\n", test.standardOutput().constData());
+#endif
printf("%s\n", test.standardError().constData());
}
if (!result) {
diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp
index 4829b6b..2389060 100644
--- a/tests/auto/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/qspinbox/tst_qspinbox.cpp
@@ -980,26 +980,28 @@ void tst_QSpinBox::sizeHint()
sizeHint_SpinBox *spinBox = new sizeHint_SpinBox;
layout->addWidget(spinBox);
widget->show();
- QTest::qWait(100);
+ QTest::qWaitForWindowShown(widget);
// Prefix
spinBox->sizeHintRequests = 0;
spinBox->setPrefix(QLatin1String("abcdefghij"));
qApp->processEvents();
- QVERIFY(spinBox->sizeHintRequests > 0);
+ QTRY_VERIFY(spinBox->sizeHintRequests > 0);
// Suffix
spinBox->sizeHintRequests = 0;
spinBox->setSuffix(QLatin1String("abcdefghij"));
qApp->processEvents();
- QVERIFY(spinBox->sizeHintRequests > 0);
+ QTRY_VERIFY(spinBox->sizeHintRequests > 0);
// Range
spinBox->sizeHintRequests = 0;
spinBox->setRange(0, 1234567890);
spinBox->setValue(spinBox->maximum());
qApp->processEvents();
- QVERIFY(spinBox->sizeHintRequests > 0);
+ QTRY_VERIFY(spinBox->sizeHintRequests > 0);
+
+ delete widget;
}
QTEST_MAIN(tst_QSpinBox)
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index 0877500..01a6317 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -46,10 +46,6 @@
#include <qtimer.h>
#include <qthread.h>
-
-
-
-
#if defined Q_OS_UNIX
#include <unistd.h>
#endif
@@ -242,7 +238,6 @@ public:
// sleep for 2ms
QTest::qSleep(2);
-
killTimer(te->timerId());
}
@@ -277,9 +272,11 @@ void tst_QTimer::livelock()
#elif defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
QEXPECT_FAIL("zero timer", "", Continue);
QEXPECT_FAIL("non-zero timer", "", Continue);
-#elif defined(Q_OS_WIN)
+#elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
if (QSysInfo::WindowsVersion < QSysInfo::WV_XP)
QEXPECT_FAIL("non-zero timer", "Multimedia timers are not available on Windows 2000", Continue);
+#elif defined(Q_OS_WINCE)
+ QEXPECT_FAIL("non-zero timer", "Windows CE devices often too slow", Continue);
#endif
QVERIFY(tester.postEventAtRightTime);
}
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp
index 1a2de65..579f4eb 100644
--- a/tests/auto/selftests/tst_selftests.cpp
+++ b/tests/auto/selftests/tst_selftests.cpp
@@ -299,7 +299,7 @@ void tst_Selftests::runSubTest()
void tst_Selftests::initTestCase()
{
-#ifndef Q_OS_UNIX
+#if !defined(Q_OS_UNIX) || defined(Q_WS_MAC)
m_checkXMLBlacklist.append("crashes"); // This test crashes (XML valid on Unix only)
#endif
m_checkXMLBlacklist.append("waitwithoutgui"); // This test is not a QTestLib test.
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index e400f8a..9858484 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -71,6 +71,8 @@ struct Section
: name(name0),
singularMember(singularMember0),
pluralMember(pluralMember0) { }
+ void appendMember(Node* node) { members.append(node); }
+ void appendReimpMember(Node* node) { reimpMembers.append(node); }
};
struct FastSection
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index ec5ce96..d93e24c 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -541,9 +541,10 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc,
else {
lastPath = parentPath;
}
-
- if (func)
+ if (func) {
func->borrowParameterNames(clone);
+ func->setParentPath(clone->parentPath());
+ }
delete clone;
}
return func;
@@ -1371,6 +1372,7 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent,
func->setAccess(access);
func->setLocation(location());
func->setReturnType(returnType.toString());
+ func->setParentPath(parentPath);
func->setTemplateStuff(templateStuff);
if (compat)
func->setStatus(Node::Compat);
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 291f60b..033c62c 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -59,6 +59,24 @@ QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
+QString HtmlGenerator::sinceTitles[] =
+ {
+ " New Namespaces",
+ " New Classes",
+ " New Member Functions",
+ " New Functions in Namespaces",
+ " New Global Functions",
+ " New Macros",
+ " New Enum Types",
+ " New Typedefs",
+ " New Properties",
+ " New Variables",
+ " New Qml Properties",
+ " New Qml Signals",
+ " New Qml Methods",
+ ""
+ };
+
static bool showBrokenLinks = false;
static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
@@ -186,7 +204,7 @@ HtmlGenerator::HtmlGenerator()
: helpProjectWriter(0), inLink(false), inContents(false),
inSectionHeading(false), inTableHeader(false), numTableRows(0),
threeColumnEnumValueTable(true), funcLeftParen("\\S(\\()"),
- tre(0), slow(false), obsoleteLinks(false)
+ myTree(0), slow(false), obsoleteLinks(false)
{
}
@@ -313,7 +331,7 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
++styleIter;
}
- tre = tree;
+ myTree = tree;
nonCompatClasses.clear();
mainClasses.clear();
compatClasses.clear();
@@ -332,64 +350,6 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
#endif
findAllSince(tree->root());
-#if 0
- if (!sinceVersions.isEmpty()) {
- SinceVersionMap::const_iterator v = sinceVersions.constEnd();
- do {
- --v;
- qDebug() << "SINCE:" << v.key();
- if (!v.value().isEmpty()) {
- QString type;
- SinceNodeMultiMap::const_iterator n = v.value().constBegin();
- while (n != v.value().constEnd()) {
- switch (n.value()->type()) {
- case Node::Namespace:
- type = "namespace";
- break;
- case Node::Class:
- type = "class";
- break;
- case Node::Fake:
- type = "fake";
- break;
- case Node::Enum:
- type = "enum";
- break;
- case Node::Typedef:
- type = "typedef";
- break;
- case Node::Function:
- type = "function";
- break;
- case Node::Property:
- type = "property";
- break;
- case Node::Variable:
- type = "variable";
- break;
- case Node::Target:
- type = "target";
- break;
- case Node::QmlProperty:
- type = "QML property";
- break;
- case Node::QmlSignal:
- type = "QML signal";
- break;
- case Node::QmlMethod:
- type = "QML method";
- break;
- default:
- type = "No type";
- }
- qDebug() << " " << type << n.key();
- ++n;
- }
- }
- } while (v != sinceVersions.constBegin());
- }
-#endif
-
PageGenerator::generateTree(tree, marker);
dcfClassesRoot.ref = "classes.html";
@@ -433,7 +393,7 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
projectUrl,
projectDescription);
- helpProjectWriter->generate(tre);
+ helpProjectWriter->generate(myTree);
}
void HtmlGenerator::startText(const Node * /* relative */,
@@ -598,13 +558,12 @@ int HtmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::AnnotatedList:
{
- QList<Node*> values = tre->groups().values(atom->string());
- QMap<QString, const Node*> nodeMap;
+ QList<Node*> values = myTree->groups().values(atom->string());
+ NodeMap nodeMap;
for (int i = 0; i < values.size(); ++i) {
const Node* n = values.at(i);
if ((n->status() != Node::Internal) && (n->access() != Node::Private)) {
nodeMap.insert(n->nameForLists(),n);
- //qDebug() << " " << n->nameForLists();
}
}
generateAnnotatedList(relative, marker, nodeMap);
@@ -633,7 +592,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
if (editionModuleMap.contains(editionName)) {
// Add all classes in the modules listed for that edition.
- QMap<QString, const Node *> editionClasses;
+ NodeMap editionClasses;
foreach (const QString &moduleName, editionModuleMap[editionName]) {
if (moduleClassMap.contains(moduleName))
editionClasses.unite(moduleClassMap[moduleName]);
@@ -642,7 +601,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
// Add additional groups and remove groups of classes that
// should be excluded from the edition.
- QMultiMap <QString, Node *> groups = tre->groups();
+ QMultiMap <QString, Node *> groups = myTree->groups();
foreach (const QString &groupName, editionGroupMap[editionName]) {
QList<Node *> groupClasses;
if (groupName.startsWith("-")) {
@@ -689,7 +648,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else if (atom->string() == "related") {
const FakeNode *fake = static_cast<const FakeNode *>(relative);
if (fake && !fake->groupMembers().isEmpty()) {
- QMap<QString, const Node *> groupMembersMap;
+ NodeMap groupMembersMap;
foreach (const Node *node, fake->groupMembers()) {
if (node->type() == Node::Fake)
groupMembersMap[fullName(node, relative, marker)] = node;
@@ -713,34 +672,116 @@ int HtmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::SinceList:
{
- QList<Node*> nodes;
- SinceVersionMap::const_iterator v;
- v = sinceVersions.find(atom->string());
- if ((v != sinceVersions.constEnd()) && !v.value().isEmpty()) {
- for (int i=0; !Node::typeName(i).isEmpty(); i++) {
- Node::Type t = (Node::Type) i;
- SinceNodeMultiMap::const_iterator n=v.value().constBegin();
- QMultiMap<QString, const Node*> nodeMap;
- while (n != v.value().constEnd()) {
- const Node* node = n.value();
- if (node->type() == t)
- nodeMap.insert(node->nameForLists(),node);
- ++n;
- }
- if (!nodeMap.isEmpty()) {
- out() << "<h2>"
- << Node::typeName(i)
- << " new in Qt "
- << atom->string()
- << "</h2>";
- generateAnnotatedList(relative, marker, nodeMap);
- nodeMap.clear();
+ NodeMultiMapMap::const_iterator v;
+ v = nodeMultiMapMap.find(atom->string());
+ NodeMapMap::const_iterator nc;
+ nc = nodeMapMap.find(atom->string());
+ if ((v != nodeMultiMapMap.constEnd()) && !v.value().isEmpty()) {
+ QList<Section> sections;
+ QList<Section>::ConstIterator s;
+ for (int i=0; i<LastSinceType; ++i)
+ sections.append(Section(sinceTitle(i),QString(),QString()));
+
+ NodeMultiMap::const_iterator n = v.value().constBegin();
+ while (n != v.value().constEnd()) {
+ const Node* node = n.value();
+ switch (node->type()) {
+ case Node::Namespace:
+ sections[Namespace].appendMember((Node*)node);
+ break;
+ case Node::Class:
+ sections[Class].appendMember((Node*)node);
+ break;
+ case Node::Enum:
+ sections[Enum].appendMember((Node*)node);
+ break;
+ case Node::Typedef:
+ sections[Typedef].appendMember((Node*)node);
+ break;
+ case Node::Function: {
+ const FunctionNode* fn = static_cast<const FunctionNode*>(node);
+ if (fn->isMacro())
+ sections[Macro].appendMember((Node*)node);
+ else {
+ Node* p = fn->parent();
+ if (p) {
+ if (p->type() == Node::Class)
+ sections[MemberFunction].appendMember((Node*)node);
+ else if (p->type() == Node::Namespace) {
+ if (p->name().isEmpty())
+ sections[GlobalFunction].appendMember((Node*)node);
+ else
+ sections[NamespaceFunction].appendMember((Node*)node);
+ }
+ else
+ sections[GlobalFunction].appendMember((Node*)node);
+ }
+ else
+ sections[GlobalFunction].appendMember((Node*)node);
+ }
+ break;
+ }
+ case Node::Property:
+ sections[Property].appendMember((Node*)node);
+ break;
+ case Node::Variable:
+ sections[Variable].appendMember((Node*)node);
+ break;
+ case Node::QmlProperty:
+ sections[QmlProperty].appendMember((Node*)node);
+ break;
+ case Node::QmlSignal:
+ sections[QmlSignal].appendMember((Node*)node);
+ break;
+ case Node::QmlMethod:
+ sections[QmlMethod].appendMember((Node*)node);
+ break;
+ default:
+ break;
}
+ ++n;
+ }
+ int idx = 0;
+ s = sections.constBegin();
+ while (s != sections.constEnd()) {
+ if (!(*s).members.isEmpty()) {
+ out() << "<a name=\""
+ << registerRef((*s).name.toLower())
+ << "\"></a>\n";
+ out() << "<h3>" << protect((*s).name) << "</h3>\n";
+ if (idx == Class)
+ generateCompactList(0, marker, nc.value(), QString("Q"));
+ else if (idx == MemberFunction) {
+ NodeMultiMapMap nodemultimapmap;
+ NodeMultiMapMap::iterator nmmap;
+ NodeList::const_iterator i = s->members.constBegin();
+ while (i != s->members.constEnd()) {
+ Node* p = (*i)->parent();
+ nmmap = nodemultimapmap.find(p->name());
+ if (nmmap == nodemultimapmap.end())
+ nmmap = nodemultimapmap.insert(p->name(),NodeMultiMap());
+ nmmap->insert((*i)->name(),(*i));
+ ++i;
+ }
+ nmmap = nodemultimapmap.begin();
+ while (nmmap != nodemultimapmap.end()) {
+ NodeList nlist = nmmap->values();
+ out() << "<p>New functions in " << protect(nmmap.key()) << ":</p>\n";
+ generateSection(nlist, 0, marker, CodeMarker::Summary);
+ out() << "<br />";
+ ++nmmap;
+ }
+ }
+ else
+ generateSection(s->members, 0, marker, CodeMarker::Summary);
+ }
+ ++idx;
+ ++s;
}
}
}
break;
-case Atom::Image:
+ case Atom::Image:
case Atom::InlineImage:
{
QString fileName = imageFileName(relative, atom->string());
@@ -1151,7 +1192,7 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
subtitleText << "[" << Atom(Atom::AutoLink, fixedModule) << " module]";
if (fixedModule.isEmpty()) {
- QMultiMap<QString, QString> publicGroups = tre->publicGroups();
+ QMultiMap<QString, QString> publicGroups = myTree->publicGroups();
QList<QString> groupNames = publicGroups.values(inner->name());
if (!groupNames.isEmpty()) {
qSort(groupNames.begin(), groupNames.end());
@@ -1492,7 +1533,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateAlsoList(fake, marker);
if (!fake->groupMembers().isEmpty()) {
- QMap<QString, const Node *> groupMembersMap;
+ NodeMap groupMembersMap;
foreach (const Node *node, fake->groupMembers()) {
if (node->type() == Node::Class || node->type() == Node::Namespace)
groupMembersMap[node->name()] = node;
@@ -1564,7 +1605,7 @@ void HtmlGenerator::generateHeader(const QString& title,
if (node && !node->doc().location().isEmpty())
out() << "<!-- " << node->doc().location().fileName() << " -->\n";
- shortVersion = tre->version();
+ shortVersion = myTree->version();
if (shortVersion.count(QChar('.')) == 2)
shortVersion.truncate(shortVersion.lastIndexOf(QChar('.')));
if (!shortVersion.isEmpty()) {
@@ -1686,7 +1727,7 @@ void HtmlGenerator::generateHeader(const QString& title,
"<body>\n";
if (mainPage)
generateMacRef(node, marker);
- out() << QString(postHeader).replace("\\" + COMMAND_VERSION, tre->version());
+ out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
if (node && !node->links().empty())
@@ -1717,8 +1758,8 @@ void HtmlGenerator::generateFooter(const Node *node)
if (node && !node->links().empty())
out() << "<p>\n" << navigationLinks << "</p>\n";
- out() << QString(footer).replace("\\" + COMMAND_VERSION, tre->version())
- << QString(address).replace("\\" + COMMAND_VERSION, tre->version())
+ out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version())
+ << QString(address).replace("\\" + COMMAND_VERSION, myTree->version())
<< "</body>\n"
"</html>\n";
}
@@ -1970,8 +2011,8 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative,
if (classMap.isEmpty())
return;
- QMap<QString, const Node *> topLevel;
- QMap<QString, const Node *>::ConstIterator c = classMap.begin();
+ NodeMap topLevel;
+ NodeMap::ConstIterator c = classMap.begin();
while (c != classMap.end()) {
const ClassNode *classe = static_cast<const ClassNode *>(*c);
if (classe->baseClasses().isEmpty())
@@ -1979,7 +2020,7 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative,
++c;
}
- QStack<QMap<QString, const Node *> > stack;
+ QStack<NodeMap > stack;
stack.push(topLevel);
out() << "<ul>\n";
@@ -1996,7 +2037,7 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative,
out() << "</li>\n";
stack.top().erase(stack.top().begin());
- QMap<QString, const Node *> newTop;
+ NodeMap newTop;
foreach (const RelatedClass &d, child->derivedClasses()) {
if (d.access != Node::Private)
newTop.insert(d.node->name(), d.node);
@@ -2011,7 +2052,7 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative,
void HtmlGenerator::generateAnnotatedList(const Node *relative,
CodeMarker *marker,
- const QMap<QString, const Node *> &nodeMap)
+ const NodeMap &nodeMap)
{
out() << "<p><table width=\"100%\" class=\"annotated\" cellpadding=\"2\" "
<< "cellspacing=\"1\" border=\"0\">\n";
@@ -2049,9 +2090,19 @@ void HtmlGenerator::generateAnnotatedList(const Node *relative,
out() << "</table></p>\n";
}
+/*!
+ This function finds the common prefix of the names of all
+ the classes in \a classMap and then generates a compact
+ list of the class names alphabetized on the part of the
+ name not including the common prefix. You can tell the
+ function to use \a comonPrefix as the common prefix, but
+ normally you let it figure it out itself by looking at
+ the name of the first and last classes in \a classMap.
+ */
void HtmlGenerator::generateCompactList(const Node *relative,
CodeMarker *marker,
- const QMap<QString, const Node *> &classMap)
+ const NodeMap &classMap,
+ QString commonPrefix)
{
const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_'
const int NumColumns = 4; // number of columns in the result
@@ -2060,64 +2111,74 @@ void HtmlGenerator::generateCompactList(const Node *relative,
return;
/*
- First, find out the common prefix of all non-namespaced classes.
- For Qt, the prefix is Q. It can easily be derived from the first
- and last classes in alphabetical order (QAccel and QXtWidget in Qt 2.1).
- */
- int commonPrefixLen = 0;
- QString commonPrefix;
- QString first;
- QString last;
-
- QMap<QString, const Node *>::const_iterator iter = classMap.begin();
- while (iter != classMap.end()) {
- if (!iter.key().contains("::")) {
- first = iter.key();
- break;
+ If commonPrefix is not empty, then the caller knows what
+ the common prefix is, so just use that.
+ */
+ int commonPrefixLen = commonPrefix.length();
+ if (commonPrefixLen == 0) {
+ QString first;
+ QString last;
+
+ /*
+ First, find out the common prefix of all non-namespaced
+ classes. For Qt, the prefix is Q. It can easily be derived
+ from the first and last classes in alphabetical order
+ (QAccel and QXtWidget in Qt 2.1).
+ */
+
+ NodeMap::const_iterator iter = classMap.begin();
+ while (iter != classMap.end()) {
+ if (!iter.key().contains("::")) {
+ first = iter.key();
+ break;
+ }
+ ++iter;
}
- ++iter;
- }
- if (first.isEmpty())
- first = classMap.begin().key();
+ if (first.isEmpty())
+ first = classMap.begin().key();
- iter = classMap.end();
- while (iter != classMap.begin()) {
- --iter;
- if (!iter.key().contains("::")) {
- last = iter.key();
- break;
+ iter = classMap.end();
+ while (iter != classMap.begin()) {
+ --iter;
+ if (!iter.key().contains("::")) {
+ last = iter.key();
+ break;
+ }
}
- }
- if (last.isEmpty())
- last = classMap.begin().key();
+ if (last.isEmpty())
+ last = classMap.begin().key();
- if (classMap.size() > 1) {
- while (commonPrefixLen < first.length() + 1 &&
- commonPrefixLen < last.length() + 1 &&
- first[commonPrefixLen] == last[commonPrefixLen])
- ++commonPrefixLen;
- }
+ if (classMap.size() > 1) {
+ while (commonPrefixLen < first.length() + 1 &&
+ commonPrefixLen < last.length() + 1 &&
+ first[commonPrefixLen] == last[commonPrefixLen])
+ ++commonPrefixLen;
+ }
- commonPrefix = first.left(commonPrefixLen);
+ commonPrefix = first.left(commonPrefixLen);
+ }
/*
Divide the data into 37 paragraphs: 0, ..., 9, A, ..., Z,
underscore (_). QAccel will fall in paragraph 10 (A) and
QXtWidget in paragraph 33 (X). This is the only place where we
assume that NumParagraphs is 37. Each paragraph is a
- QMap<QString, const Node *>.
+ NodeMap.
*/
- QMap<QString, const Node *> paragraph[NumParagraphs+1];
+ NodeMap paragraph[NumParagraphs+1];
QString paragraphName[NumParagraphs+1];
- QMap<QString, const Node *>::ConstIterator c = classMap.begin();
+ NodeMap::ConstIterator c = classMap.begin();
while (c != classMap.end()) {
QStringList pieces = c.key().split("::");
QString key;
+ int idx = commonPrefixLen;
+ if (!pieces.last().startsWith(commonPrefix))
+ idx = 0;
if (pieces.size() == 1)
- key = pieces.last().mid(commonPrefixLen).toLower();
+ key = pieces.last().mid(idx).toLower();
else
key = pieces.last().toLower();
@@ -2206,7 +2267,7 @@ void HtmlGenerator::generateCompactList(const Node *relative,
if ((currentParagraphNo[i] < NumParagraphs) &&
!paragraphName[currentParagraphNo[i]].isEmpty()) {
- QMap<QString, const Node *>::Iterator it;
+ NodeMap::Iterator it;
it = paragraph[currentParagraphNo[i]].begin();
for (j = 0; j < currentOffsetInParagraph[i]; j++)
++it;
@@ -2253,7 +2314,7 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative,
#if 1
out() << "<ul>\n";
#endif
- QMap<QString, QMap<QString, const Node *> >::ConstIterator f = funcIndex.begin();
+ QMap<QString, NodeMap >::ConstIterator f = funcIndex.begin();
while (f != funcIndex.end()) {
#if 1
out() << "<li>";
@@ -2268,7 +2329,7 @@ void HtmlGenerator::generateFunctionIndex(const Node *relative,
nextLetter++;
}
- QMap<QString, const Node *>::ConstIterator s = (*f).begin();
+ NodeMap::ConstIterator s = (*f).begin();
while (s != (*f).end()) {
out() << " ";
generateFullName((*s)->parent(), relative, marker, *s);
@@ -2384,7 +2445,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m
QMap<QString, FakeNode *> uncategorizedNodeMap;
QRegExp singleDigit("\\b([0-9])\\b");
- const NodeList children = tre->root()->childNodes();
+ const NodeList children = myTree->root()->childNodes();
foreach (Node *child, children) {
if (child->type() == Node::Fake && child != relative) {
FakeNode *fakeNode = static_cast<FakeNode *>(child);
@@ -2436,7 +2497,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m
else if (!isGroupPage) {
// If we encounter a page that belongs to a group then
// we add that page to the list for that group.
- const FakeNode *groupNode = static_cast<const FakeNode *>(tre->root()->findNode(group, Node::Fake));
+ const FakeNode *groupNode = static_cast<const FakeNode *>(myTree->root()->findNode(group, Node::Fake));
if (groupNode)
fakeNodeMap[groupNode].insert(sortKey, fakeNode);
//else
@@ -2748,7 +2809,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
if (parseArg(src, funcTag, &i, n, &arg, &par1)) {
QString link = linkForNode(
marker->resolveTarget(par1.toString(),
- tre,
+ myTree,
relative),
relative);
addLink(link, arg, &html);
@@ -2777,7 +2838,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) {
par1 = QStringRef();
QString link = linkForNode(
- marker->resolveTarget(arg.toString(), tre, relative),
+ marker->resolveTarget(arg.toString(), myTree, relative),
relative);
addLink(link, arg, &html);
handled = true;
@@ -3018,7 +3079,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
if (parseArg(src, funcTag, &i, n, &arg, &par1)) {
QString link = linkForNode(
marker->resolveTarget(par1.toString(),
- tre,
+ myTree,
relative),
relative);
addLink(link, arg, &html);
@@ -3047,7 +3108,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) {
par1 = QStringRef();
QString link = linkForNode(
- marker->resolveTarget(arg.toString(), tre, relative),
+ marker->resolveTarget(arg.toString(), myTree, relative),
relative);
addLink(link, arg, &html);
handled = true;
@@ -3591,9 +3652,13 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
while (c != node->childNodes().constEnd()) {
QString sinceVersion = (*c)->since();
if (((*c)->access() != Node::Private) && !sinceVersion.isEmpty()) {
- SinceVersionMap::iterator vmap = sinceVersions.find(sinceVersion);
- if (vmap == sinceVersions.end())
- vmap = sinceVersions.insert(sinceVersion,SinceNodeMultiMap());
+ NodeMultiMapMap::iterator vmap = nodeMultiMapMap.find(sinceVersion);
+ if (vmap == nodeMultiMapMap.end())
+ vmap = nodeMultiMapMap.insert(sinceVersion,NodeMultiMap());
+ NodeMapMap::iterator ncmap = nodeMapMap.find(sinceVersion);
+ if (ncmap == nodeMapMap.end())
+ ncmap = nodeMapMap.insert(sinceVersion,NodeMap());
+
if ((*c)->type() == Node::Function) {
FunctionNode *func = static_cast<FunctionNode *>(*c);
if ((func->status() > Node::Obsolete) &&
@@ -3610,6 +3675,7 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
!(*c)->parent()->name().isEmpty())
className = (*c)->parent()->name()+"::"+className;
vmap.value().insert(className,(*c));
+ ncmap.value().insert(className,(*c));
}
}
else {
@@ -3619,7 +3685,6 @@ void HtmlGenerator::findAllSince(const InnerNode *node)
!(*c)->parent()->name().isEmpty())
name = (*c)->parent()->name()+"::"+name;
vmap.value().insert(name,(*c));
- qDebug() << "GOT HEAH" << name;
}
if ((*c)->isInnerNode()) {
findAllSince(static_cast<InnerNode *>(*c));
@@ -3646,9 +3711,10 @@ void HtmlGenerator::findAllFunctions(const InnerNode *node)
}
else if ((*c)->type() == Node::Function) {
const FunctionNode *func = static_cast<const FunctionNode *>(*c);
- if (func->status() > Node::Obsolete && func->metaness() != FunctionNode::Ctor
- && func->metaness() != FunctionNode::Dtor) {
- funcIndex[(*c)->name()].insert(tre->fullDocumentName((*c)->parent()), *c);
+ if ((func->status() > Node::Obsolete) &&
+ (func->metaness() != FunctionNode::Ctor) &&
+ (func->metaness() != FunctionNode::Dtor)) {
+ funcIndex[(*c)->name()].insert(myTree->fullDocumentName((*c)->parent()), *c);
}
}
}
@@ -3762,14 +3828,14 @@ const Node *HtmlGenerator::findNodeForTarget(const QString &target,
node = relative;
}
else if (target.endsWith(".html")) {
- node = tre->root()->findNode(target, Node::Fake);
+ node = myTree->root()->findNode(target, Node::Fake);
}
else if (marker) {
- node = marker->resolveTarget(target, tre, relative);
+ node = marker->resolveTarget(target, myTree, relative);
if (!node)
- node = tre->findFakeNodeByTitle(target);
+ node = myTree->findFakeNodeByTitle(target);
if (!node && atom) {
- node = tre->findUnambiguousTarget(target,
+ node = myTree->findUnambiguousTarget(target,
*const_cast<Atom**>(&atom));
}
}
@@ -3827,14 +3893,14 @@ QString HtmlGenerator::getLink(const Atom *atom,
*node = relative;
}
else if (first.endsWith(".html")) {
- *node = tre->root()->findNode(first, Node::Fake);
+ *node = myTree->root()->findNode(first, Node::Fake);
}
else {
- *node = marker->resolveTarget(first, tre, relative);
+ *node = marker->resolveTarget(first, myTree, relative);
if (!*node)
- *node = tre->findFakeNodeByTitle(first);
+ *node = myTree->findFakeNodeByTitle(first);
if (!*node)
- *node = tre->findUnambiguousTarget(first, targetAtom);
+ *node = myTree->findUnambiguousTarget(first, targetAtom);
}
if (*node) {
@@ -3886,7 +3952,7 @@ QString HtmlGenerator::getLink(const Atom *atom,
}
while (!path.isEmpty()) {
- targetAtom = tre->findTarget(path.first(), *node);
+ targetAtom = myTree->findTarget(path.first(), *node);
if (targetAtom == 0)
break;
path.removeFirst();
@@ -3915,7 +3981,7 @@ void HtmlGenerator::generateIndex(const QString &fileBase,
const QString &url,
const QString &title)
{
- tre->generateIndex(outputDir() + "/" + fileBase + ".index", url, title);
+ myTree->generateIndex(outputDir() + "/" + fileBase + ".index", url, title);
}
void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker)
@@ -3930,18 +3996,21 @@ void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker)
case Node::Compat:
if (node->isInnerNode()) {
text << Atom::ParaLeft
- << Atom(Atom::FormattingLeft,ATOM_FORMATTING_BOLD) << "This "
- << typeString(node) << " is part of the Qt 3 support library."
+ << Atom(Atom::FormattingLeft,ATOM_FORMATTING_BOLD)
+ << "This "
+ << typeString(node)
+ << " is part of the Qt 3 support library."
<< Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << " It is provided to keep old source code working. We strongly advise against "
+ << " It is provided to keep old source code working. "
+ << "We strongly advise against "
<< "using it in new code. See ";
- const FakeNode *fakeNode = tre->findFakeNodeByTitle("Porting To Qt 4");
+ const FakeNode *fakeNode = myTree->findFakeNodeByTitle("Porting To Qt 4");
Atom *targetAtom = 0;
if (fakeNode && node->type() == Node::Class) {
QString oldName(node->name());
- targetAtom = tre->findTarget(oldName.replace("3", ""),
- fakeNode);
+ targetAtom = myTree->findTarget(oldName.replace("3", ""),
+ fakeNode);
}
if (targetAtom) {
@@ -4151,7 +4220,7 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* cn,
QPair<QString,QString> linkPair;
linkPair = cn->links()[Node::InheritsLink];
QStringList strList(linkPair.first);
- const Node* n = tre->findNode(strList,Node::Fake);
+ const Node* n = myTree->findNode(strList,Node::Fake);
if (n && n->subType() == Node::QmlClass) {
const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
out() << "<p style=\"text-align: center\">";
@@ -4210,7 +4279,7 @@ void HtmlGenerator::generateInstantiatedBy(const ClassNode* cn,
CodeMarker* marker)
{
if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) {
- const Node* n = tre->root()->findNode(cn->qmlElement(),Node::Fake);
+ const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake);
if (n && n->subType() == Node::QmlClass) {
out() << "<p style=\"text-align: center\">";
Text text;
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 3f6e564..fabfed1 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -67,14 +67,34 @@ struct NavigationBar
};
#endif
-typedef QMultiMap<QString, Node*> SinceNodeMultiMap;
-typedef QMap<QString, SinceNodeMultiMap> SinceVersionMap;
+typedef QMultiMap<QString, Node*> NodeMultiMap;
+typedef QMap<QString, NodeMultiMap> NodeMultiMapMap;
+typedef QMap<QString, const Node*> NodeMap;
+typedef QMap<QString, NodeMap> NodeMapMap;
class HelpProjectWriter;
class HtmlGenerator : public PageGenerator
{
public:
+ enum SinceType {
+ Namespace,
+ Class,
+ MemberFunction,
+ NamespaceFunction,
+ GlobalFunction,
+ Macro,
+ Enum,
+ Typedef,
+ Property,
+ Variable,
+ QmlProperty,
+ QmlSignal,
+ QmlMethod,
+ LastSinceType
+ };
+
+ public:
HtmlGenerator();
~HtmlGenerator();
@@ -85,6 +105,7 @@ class HtmlGenerator : public PageGenerator
static QString protect(const QString& string);
static QString cleanRef(const QString& ref);
+ static QString sinceTitle(int i) { return sinceTitles[i]; }
protected:
virtual void startText(const Node *relative, CodeMarker *marker);
@@ -134,13 +155,14 @@ class HtmlGenerator : public PageGenerator
CodeMarker::Status status);
void generateClassHierarchy(const Node *relative,
CodeMarker *marker,
- const QMap<QString,const Node *> &classMap);
+ const NodeMap &classMap);
void generateAnnotatedList(const Node *relative,
CodeMarker *marker,
- const QMap<QString, const Node *> &nodeMap);
+ const NodeMap &nodeMap);
void generateCompactList(const Node *relative,
CodeMarker *marker,
- const QMap<QString, const Node *> &classMap);
+ const NodeMap &classMap,
+ QString commonPrefix = QString());
void generateFunctionIndex(const Node *relative, CodeMarker *marker);
void generateLegaleseList(const Node *relative, CodeMarker *marker);
void generateOverviewList(const Node *relative, CodeMarker *marker);
@@ -273,23 +295,25 @@ class HtmlGenerator : public PageGenerator
QString navigationLinks;
QStringList stylesheets;
QStringList customHeadElements;
- const Tree *tre;
+ const Tree *myTree;
bool slow;
bool obsoleteLinks;
- QMap<QString, QMap<QString, const Node *> > moduleClassMap;
- QMap<QString, QMap<QString, const Node *> > moduleNamespaceMap;
- QMap<QString, const Node *> nonCompatClasses;
- QMap<QString, const Node *> mainClasses;
- QMap<QString, const Node *> compatClasses;
- QMap<QString, const Node *> obsoleteClasses;
- QMap<QString, const Node *> namespaceIndex;
- QMap<QString, const Node *> serviceClasses;
+ QMap<QString, NodeMap > moduleClassMap;
+ QMap<QString, NodeMap > moduleNamespaceMap;
+ NodeMap nonCompatClasses;
+ NodeMap mainClasses;
+ NodeMap compatClasses;
+ NodeMap obsoleteClasses;
+ NodeMap namespaceIndex;
+ NodeMap serviceClasses;
#ifdef QDOC_QML
- QMap<QString, const Node *> qmlClasses;
+ NodeMap qmlClasses;
#endif
- QMap<QString, QMap<QString, const Node *> > funcIndex;
+ QMap<QString, NodeMap > funcIndex;
QMap<Text, const Node *> legaleseTexts;
- SinceVersionMap sinceVersions;
+ NodeMultiMapMap nodeMultiMapMap;
+ static QString sinceTitles[];
+ NodeMapMap nodeMapMap;
};
#define HTMLGENERATOR_ADDRESS "address"
@@ -303,3 +327,4 @@ class HtmlGenerator : public PageGenerator
QT_END_NAMESPACE
#endif
+
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index d547d20..558808f 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -48,29 +48,17 @@
QT_BEGIN_NAMESPACE
-QString Node::typeNames[] =
- {
- "Namespaces",
- "Classes",
- "Fake",
- "Enums",
- "Typedefs",
- "Functions and Macros",
- "Properties",
- "Variables",
- "Targets",
- "Qml Properties",
- "Qml Signals",
- "Qml Methods",
- ""
- };
-
/*!
\class Node
- \brief A node in a Tree.
+ \brief The Node class is a node in the Tree.
+
+ A Node represents a class or function or something else
+ from the source code..
*/
/*!
+ When this Node is destroyed, if it has a parent Node, it
+ removes itself from the parent node's child list.
*/
Node::~Node()
{
@@ -81,6 +69,11 @@ Node::~Node()
}
/*!
+ Sets this Node's Doc to \a doc. If \a replace is false and
+ this Node already has a Doc, a warning is reported that the
+ Doc is being overridden, and it reports where the previous
+ Doc was found. If \a replace is true, the Doc is replaced
+ silently.
*/
void Node::setDoc(const Doc& doc, bool replace)
{
@@ -840,9 +833,17 @@ void TypedefNode::setAssociatedEnum(const EnumNode *enume)
/*!
\class Parameter
+ \brief The class Parameter contains one parameter.
+
+ A parameter can be a function parameter or a macro
+ parameter.
*/
/*!
+ Constructs this parameter from the left and right types
+ \a leftType and rightType, the parameter \a name, and the
+ \a defaultValue. In practice, \a rightType is not used,
+ and I don't know what is was meant for.
*/
Parameter::Parameter(const QString& leftType,
const QString& rightType,
@@ -853,6 +854,7 @@ Parameter::Parameter(const QString& leftType,
}
/*!
+ The standard copy constructor copies the strings from \a p.
*/
Parameter::Parameter(const Parameter& p)
: lef(p.lef), rig(p.rig), nam(p.nam), def(p.def)
@@ -860,6 +862,8 @@ Parameter::Parameter(const Parameter& p)
}
/*!
+ Assigning Parameter \a p to this Parameter copies the
+ strings across.
*/
Parameter& Parameter::operator=(const Parameter& p)
{
@@ -871,6 +875,23 @@ Parameter& Parameter::operator=(const Parameter& p)
}
/*!
+ Reconstructs the text describing the parameter and
+ returns it. If \a value is true, the default value
+ will be included, if there is one.
+ */
+QString Parameter::reconstruct(bool value) const
+{
+ QString p = lef + rig;
+ if (!p.endsWith(QChar('*')) && !p.endsWith(QChar('&')) && !p.endsWith(QChar(' ')))
+ p += " ";
+ p += nam;
+ if (value)
+ p += def;
+ return p;
+}
+
+
+/*!
\class FunctionNode
*/
@@ -924,6 +945,8 @@ void FunctionNode::borrowParameterNames(const FunctionNode *source)
}
/*!
+ If this function is a reimplementation, \a from points
+ to the FunctionNode of the function being reimplemented.
*/
void FunctionNode::setReimplementedFrom(FunctionNode *from)
{
@@ -932,6 +955,8 @@ void FunctionNode::setReimplementedFrom(FunctionNode *from)
}
/*!
+ Sets the "associated" property to \a property. The function
+ might be the setter or getter for a property, for example.
*/
void FunctionNode::setAssociatedProperty(PropertyNode *property)
{
@@ -939,6 +964,8 @@ void FunctionNode::setAssociatedProperty(PropertyNode *property)
}
/*!
+ Returns the overload number for this function obtained
+ from the parent.
*/
int FunctionNode::overloadNumber() const
{
@@ -946,6 +973,8 @@ int FunctionNode::overloadNumber() const
}
/*!
+ Returns the number of times this function name has been
+ overloaded, obtained from the parent.
*/
int FunctionNode::numOverloads() const
{
@@ -953,6 +982,7 @@ int FunctionNode::numOverloads() const
}
/*!
+ Returns the list of parameter names.
*/
QStringList FunctionNode::parameterNames() const
{
@@ -966,6 +996,46 @@ QStringList FunctionNode::parameterNames() const
}
/*!
+ Returns the list of reconstructed parameters. If \a values
+ is true, the default values are included, if any are present.
+ */
+QStringList FunctionNode::reconstructParams(bool values) const
+{
+ QStringList params;
+ QList<Parameter>::ConstIterator p = parameters().begin();
+ while (p != parameters().end()) {
+ params << (*p).reconstruct(values);
+ ++p;
+ }
+ return params;
+}
+
+/*!
+ Reconstructs and returns the function's signature. If \a values
+ is true, the default values of the parameters are included, if
+ present.
+ */
+QString FunctionNode::signature(bool values) const
+{
+ QString s;
+ if (!returnType().isEmpty())
+ s = returnType() + " ";
+ s += name() + "(";
+ QStringList params = reconstructParams(values);
+ int p = params.size();
+ if (p > 0) {
+ for (int i=0; i<p; i++) {
+ s += params[i];
+ if (i < (p-1))
+ s += ", ";
+ }
+ }
+ s += ")";
+ return s;
+}
+
+
+/*!
\class PropertyNode
*/
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 09f38d2..f933270 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -175,13 +175,11 @@ class Node
virtual QString fileBase() const;
- static QString typeName(int i) { return typeNames[i]; }
-
protected:
Node(Type type, InnerNode *parent, const QString& name);
private:
- static QString typeNames[];
+
#ifdef Q_WS_WIN
Type typ;
Access acc;
@@ -500,8 +498,10 @@ class Parameter
{
public:
Parameter() {}
- Parameter(const QString& leftType, const QString& rightType = "",
- const QString& name = "", const QString& defaultValue = "");
+ Parameter(const QString& leftType,
+ const QString& rightType = "",
+ const QString& name = "",
+ const QString& defaultValue = "");
Parameter(const Parameter& p);
Parameter& operator=(const Parameter& p);
@@ -514,6 +514,8 @@ class Parameter
const QString& name() const { return nam; }
const QString& defaultValue() const { return def; }
+ QString reconstruct(bool value = false) const;
+
private:
QString lef;
QString rig;
@@ -541,6 +543,7 @@ class FunctionNode : public LeafNode
virtual ~FunctionNode() { }
void setReturnType(const QString& returnType) { rt = returnType; }
+ void setParentPath(const QStringList& parentPath) { pp = parentPath; }
void setMetaness(Metaness metaness) { met = metaness; }
void setVirtualness(Virtualness virtualness) { vir = virtualness; }
void setConst(bool conste) { con = conste; }
@@ -569,6 +572,10 @@ class FunctionNode : public LeafNode
const FunctionNode *reimplementedFrom() const { return rf; }
const QList<FunctionNode *> &reimplementedBy() const { return rb; }
const PropertyNode *associatedProperty() const { return ap; }
+ const QStringList& parentPath() const { return pp; }
+
+ QStringList reconstructParams(bool values = false) const;
+ QString signature(bool values = false) const;
private:
void setAssociatedProperty(PropertyNode *property);
@@ -576,9 +583,10 @@ class FunctionNode : public LeafNode
friend class InnerNode;
friend class PropertyNode;
- QString rt;
+ QString rt;
+ QStringList pp;
#ifdef Q_WS_WIN
- Metaness met;
+ Metaness met;
Virtualness vir;
#else
Metaness met : 4;
diff --git a/translations/translations.pri b/translations/translations.pri
index b7924cd..c77876a 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -9,12 +9,9 @@ defineReplace(prependAll) {
}
defineReplace(fixPath) {
-WIN {
- return ($$replace($$1, /, \))
-} ELSE {
+ win32:1 ~= s|/|\\|
return ($$1)
}
-}
LUPDATE = $$fixPath($$QT_BUILD_TREE/bin/lupdate) -locations relative -no-ui-lines
LRELEASE = $$fixPath($$QT_BUILD_TREE/bin/lrelease)