From b3a703901e9adbe80e67ca4700c589596d009247 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 17 Aug 2009 10:41:03 +0200 Subject: Use custom S60 framework construction instead of RunApplication(). Conflicts: src/s60main/qts60main.cpp --- src/s60main/qts60main.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/s60main/qts60main.cpp b/src/s60main/qts60main.cpp index 4112424..c6e74c3 100644 --- a/src/s60main/qts60main.cpp +++ b/src/s60main/qts60main.cpp @@ -42,6 +42,9 @@ // INCLUDE FILES #include #include +#include +#include + #include "qts60mainapplication_p.h" /** @@ -58,5 +61,17 @@ LOCAL_C CApaApplication* NewApplication() */ GLDEF_C TInt E32Main() { - return EikStart::RunApplication(NewApplication); + TApaApplicationFactory factory(NewApplication); + CApaCommandLine* commandLine=NULL; + TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine); + CEikonEnv* coe=new CEikonEnv; + TRAP(err, coe->ConstructAppFromCommandLineL(factory,*commandLine)); + delete commandLine; + + CActiveScheduler::Start(); + + coe->PrepareToExit(); + coe->DestroyEnvironment(); + + return 0; } -- cgit v0.12 From 99929a28df4812c86b4aabc4d02490d9fac87e85 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 3 Sep 2009 15:33:31 +0200 Subject: fix warnings in stickman demo on mingw We now also use the brand-new QGraphicsObject class We also make sure we have less memory leak or bad deallocation. --- examples/animation/stickman/lifecycle.cpp | 4 ++-- examples/animation/stickman/main.cpp | 38 +++++++++++++++---------------- examples/animation/stickman/node.cpp | 4 ++-- examples/animation/stickman/node.h | 3 +-- examples/animation/stickman/stickman.cpp | 5 ---- examples/animation/stickman/stickman.h | 15 ++++++------ 6 files changed, 32 insertions(+), 37 deletions(-) diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp index 0fff529..463a27d 100644 --- a/examples/animation/stickman/lifecycle.cpp +++ b/examples/animation/stickman/lifecycle.cpp @@ -100,7 +100,7 @@ LifeCycle::LifeCycle(StickMan *stickMan, GraphicsView *keyReceiver) m_animationGroup = new QParallelAnimationGroup(); const int stickManNodeCount = m_stickMan->nodeCount(); for (int i=0; inode(i), "position"); + QPropertyAnimation *pa = new QPropertyAnimation(m_stickMan->node(i), "pos"); m_animationGroup->addAnimation(pa); } @@ -186,7 +186,7 @@ QState *LifeCycle::makeState(QState *parentState, const QString &animationFileNa QState *frameState = new QState(topLevel); const int nodeCount = animation.nodeCount(); for (int j=0; jassignProperty(m_stickMan->node(j), "position", animation.nodePos(j)); + frameState->assignProperty(m_stickMan->node(j), "pos", animation.nodePos(j)); //! [1] frameState->setObjectName(QString::fromLatin1("frame %0").arg(i)); diff --git a/examples/animation/stickman/main.cpp b/examples/animation/stickman/main.cpp index 799f45c..f363d5d 100644 --- a/examples/animation/stickman/main.cpp +++ b/examples/animation/stickman/main.cpp @@ -73,30 +73,30 @@ int main(int argc, char **argv) QRectF stickManBoundingRect = stickMan->mapToScene(stickMan->boundingRect()).boundingRect(); textItem->setPos(-w / 2.0, stickManBoundingRect.bottom() + 25.0); - QGraphicsScene *scene = new QGraphicsScene(); - scene->addItem(stickMan); - scene->addItem(textItem); - scene->setBackgroundBrush(Qt::black); + QGraphicsScene scene; + scene.addItem(stickMan); + scene.addItem(textItem); + scene.setBackgroundBrush(Qt::black); - GraphicsView *view = new GraphicsView(); - view->setRenderHints(QPainter::Antialiasing); - view->setTransformationAnchor(QGraphicsView::NoAnchor); - view->setScene(scene); - view->show(); - view->setFocus(); + GraphicsView view; + view.setRenderHints(QPainter::Antialiasing); + view.setTransformationAnchor(QGraphicsView::NoAnchor); + view.setScene(&scene); + view.show(); + view.setFocus(); - QRectF sceneRect = scene->sceneRect(); + QRectF sceneRect = scene.sceneRect(); // making enough room in the scene for stickman to jump and die - view->resize(sceneRect.width() + 100, sceneRect.height() + 100); - view->setSceneRect(sceneRect); + view.resize(sceneRect.width() + 100, sceneRect.height() + 100); + view.setSceneRect(sceneRect); - LifeCycle *cycle = new LifeCycle(stickMan, view); - cycle->setDeathAnimation(":/animations/dead"); + LifeCycle cycle(stickMan, &view); + cycle.setDeathAnimation(":/animations/dead"); - cycle->addActivity(":/animations/jumping", Qt::Key_J); - cycle->addActivity(":/animations/dancing", Qt::Key_D); - cycle->addActivity(":/animations/chilling", Qt::Key_C); - cycle->start(); + cycle.addActivity(":/animations/jumping", Qt::Key_J); + cycle.addActivity(":/animations/dancing", Qt::Key_D); + cycle.addActivity(":/animations/chilling", Qt::Key_C); + cycle.start(); return app.exec(); } diff --git a/examples/animation/stickman/node.cpp b/examples/animation/stickman/node.cpp index 69ff906..1a138b2 100644 --- a/examples/animation/stickman/node.cpp +++ b/examples/animation/stickman/node.cpp @@ -47,7 +47,7 @@ #include Node::Node(const QPointF &pos, QGraphicsItem *parent) - : QGraphicsItem(parent), m_dragging(false) + : QGraphicsObject(parent), m_dragging(false) { setPos(pos); setFlag(QGraphicsItem::ItemSendsGeometryChanges); @@ -73,7 +73,7 @@ QVariant Node::itemChange(GraphicsItemChange change, const QVariant &value) if (change == QGraphicsItem::ItemPositionChange) emit positionChanged(); - return QGraphicsItem::itemChange(change, value); + return QGraphicsObject::itemChange(change, value); } void Node::mousePressEvent(QGraphicsSceneMouseEvent *) diff --git a/examples/animation/stickman/node.h b/examples/animation/stickman/node.h index 66ee565..4360d2e 100644 --- a/examples/animation/stickman/node.h +++ b/examples/animation/stickman/node.h @@ -44,10 +44,9 @@ #include -class Node: public QObject, public QGraphicsItem +class Node: public QGraphicsObject { Q_OBJECT - Q_PROPERTY(QPointF position READ pos WRITE setPos) public: Node(const QPointF &pos, QGraphicsItem *parent = 0); ~Node(); diff --git a/examples/animation/stickman/stickman.cpp b/examples/animation/stickman/stickman.cpp index 78e9e5b..67e022b 100644 --- a/examples/animation/stickman/stickman.cpp +++ b/examples/animation/stickman/stickman.cpp @@ -52,7 +52,6 @@ #define M_PI 3.14159265358979323846 #endif -static const int NodeCount = 16; static const qreal Coords[NodeCount * 2] = { 0.0, -150.0, // head, #0 @@ -79,7 +78,6 @@ static const qreal Coords[NodeCount * 2] = { }; -static const int BoneCount = 24; static const int Bones[BoneCount * 2] = { 0, 1, // neck @@ -116,7 +114,6 @@ static const int Bones[BoneCount * 2] = { StickMan::StickMan() { - m_nodes = new Node*[NodeCount]; m_sticks = true; m_isDead = false; m_pixmap = QPixmap("images/head.png"); @@ -129,7 +126,6 @@ StickMan::StickMan() connect(m_nodes[i], SIGNAL(positionChanged()), this, SLOT(childPositionChanged())); } - m_perfectBoneLengths = new qreal[BoneCount]; for (int i=0; i +#include -const int LimbCount = 16; +static const int NodeCount = 16; +static const int BoneCount = 24; class Node; QT_BEGIN_NAMESPACE -class QTimer; QT_END_NAMESPACE -class StickMan: public QObject, public QGraphicsItem +class StickMan: public QGraphicsObject { Q_OBJECT Q_PROPERTY(QColor penColor WRITE setPenColor READ penColor) @@ -77,7 +77,7 @@ public: bool isDead() const { return m_isDead; } void setIsDead(bool isDead) { m_isDead = isDead; } - + public slots: void stabilize(); void childPositionChanged(); @@ -86,10 +86,11 @@ protected: void timerEvent(QTimerEvent *e); private: + QPointF posFor(int idx) const; - Node **m_nodes; - qreal *m_perfectBoneLengths; + Node *m_nodes[NodeCount]; + qreal m_perfectBoneLengths[BoneCount]; uint m_sticks : 1; uint m_isDead : 1; -- cgit v0.12 From d05aa6a493b532b90466cc106c0f8bb05d8ca41f Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Thu, 3 Sep 2009 16:16:57 +0200 Subject: Fix more warnings for mingw --- examples/itemviews/addressbook/addresswidget.cpp | 2 +- examples/multitouch/pinchzoom/mouse.h | 5 ++--- examples/script/context2d/context2d.cpp | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/itemviews/addressbook/addresswidget.cpp b/examples/itemviews/addressbook/addresswidget.cpp index 6d05c22..c8dcb57 100644 --- a/examples/itemviews/addressbook/addresswidget.cpp +++ b/examples/itemviews/addressbook/addresswidget.cpp @@ -104,7 +104,7 @@ void AddressWidget::editEntry() QModelIndex index, i; QString name; QString address; - int row; + int row = -1; foreach (index, indexes) { row = proxy->mapToSource(index).row(); diff --git a/examples/multitouch/pinchzoom/mouse.h b/examples/multitouch/pinchzoom/mouse.h index bd47245..e4ecb75 100644 --- a/examples/multitouch/pinchzoom/mouse.h +++ b/examples/multitouch/pinchzoom/mouse.h @@ -42,11 +42,10 @@ #ifndef MOUSE_H #define MOUSE_H -#include -#include +#include //! [0] -class Mouse : public QObject, public QGraphicsItem +class Mouse : public QGraphicsObject { Q_OBJECT diff --git a/examples/script/context2d/context2d.cpp b/examples/script/context2d/context2d.cpp index 5b4a1cf..05352cd 100644 --- a/examples/script/context2d/context2d.cpp +++ b/examples/script/context2d/context2d.cpp @@ -369,7 +369,7 @@ void Context2D::setLineCap(const QString &capString) style = Qt::RoundCap; else if (capString == "square") style = Qt::SquareCap; - else if (capString == "butt") + else //if (capString == "butt") style = Qt::FlatCap; m_state.lineCap = style; m_state.flags |= DirtyLineCap; @@ -397,7 +397,7 @@ void Context2D::setLineJoin(const QString &joinString) style = Qt::RoundJoin; else if (joinString == "bevel") style = Qt::BevelJoin; - else if (joinString == "miter") + else //if (joinString == "miter") style = Qt::MiterJoin; m_state.lineJoin = style; m_state.flags |= DirtyLineJoin; -- cgit v0.12 From 5fff965369168bc3db164b33ecf6973059567e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 1 Sep 2009 17:37:45 +0200 Subject: Fixed issues with using GLenum in public API on mac. The type of GLenum was changed between 10.4 and 10.5, so to support compiling on one and deploying on the other we need this hack. Also get rid of the complex QGLFramebufferObjectFormat constructor in favor of a simple default constructor and setters, which is more Qt-ish anyway, and avoids ambiguities on mac. Reviewed-by: Trond --- src/opengl/qglframebufferobject.cpp | 72 +++++++++++++++++++++---------------- src/opengl/qglframebufferobject.h | 18 ++++------ src/opengl/qglpixmapfilter.cpp | 2 +- src/opengl/qpixmapdata_gl.cpp | 2 +- src/opengl/qwindowsurface_gl.cpp | 2 +- 5 files changed, 50 insertions(+), 46 deletions(-) diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 427aab3..a03e627 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -109,38 +109,28 @@ public: */ /*! - Creates a QGLFramebufferObjectFormat object with properties specifying + Creates a QGLFramebufferObjectFormat object for specifying the format of an OpenGL framebuffer object. - A multisample framebuffer object is specified by setting \a samples - to a value different from zero. If the desired amount of samples per pixel is - not supported by the hardware then the maximum number of samples per pixel - will be used. Note that multisample framebuffer objects can not be bound as - textures. Also, the \c{GL_EXT_framebuffer_multisample} extension is required - to create a framebuffer with more than one sample per pixel. - - For multisample framebuffer objects a color render buffer is created, - otherwise a texture with the texture target \a target is created. - The color render buffer or texture will have the internal format - \a internalFormat, and will be bound to the \c GL_COLOR_ATTACHMENT0 - attachment in the framebuffer object. - - The \a attachment parameter describes the depth/stencil buffer - configuration. + By default the format specifies a non-multisample framebuffer object with no + attachments, texture target \c GL_TEXTURE_2D, and internal format \c GL_RGBA8. \sa samples(), attachment(), target(), internalFormat() */ -QGLFramebufferObjectFormat::QGLFramebufferObjectFormat(int samples, - QGLFramebufferObject::Attachment attachment, - GLenum target, - GLenum internalFormat) +#ifndef QT_OPENGL_ES +#define DEFAULT_FORMAT GL_RGBA8 +#else +#define DEFAULT_FORMAT GL_RGBA +#endif + +QGLFramebufferObjectFormat::QGLFramebufferObjectFormat() { d = new QGLFramebufferObjectFormatPrivate; - d->samples = samples; - d->attachment = attachment; - d->target = target; - d->internal_format = internalFormat; + d->samples = 0; + d->attachment = QGLFramebufferObject::NoAttachment; + d->target = GL_TEXTURE_2D; + d->internal_format = DEFAULT_FORMAT; } /*! @@ -176,6 +166,12 @@ QGLFramebufferObjectFormat::~QGLFramebufferObjectFormat() to \a samples. A sample count of 0 represents a regular non-multisample framebuffer object. + If the desired amount of samples per pixel is not supported by the hardware + then the maximum number of samples per pixel will be used. Note that + multisample framebuffer objects can not be bound as textures. Also, the + \c{GL_EXT_framebuffer_multisample} extension is required to create a + framebuffer with more than one sample per pixel. + \sa samples() */ void QGLFramebufferObjectFormat::setSamples(int samples) @@ -195,7 +191,7 @@ int QGLFramebufferObjectFormat::samples() const } /*! - Sets the attachments a framebuffer object should have to \a attachment. + Sets the attachment configuration of a framebuffer object to \a attachment. \sa attachment() */ @@ -259,6 +255,20 @@ GLenum QGLFramebufferObjectFormat::internalFormat() const return d->internal_format; } +#ifdef Q_MAC_COMPAT_GL_FUNCTIONS +/*! \internal */ +void QGLFramebufferObjectFormat::setTextureTarget(QMacCompatGLenum target) +{ + d->target = target; +} + +/*! \internal */ +void QGLFramebufferObjectFormat::setInternalFormat(QMacCompatGLenum internalFormat) +{ + d->internal_format = internalFormat; +} +#endif + class QGLFramebufferObjectPrivate { public: @@ -526,6 +536,12 @@ void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::At the constructors that take a QGLFramebufferObject parameter, and set the QGLFramebufferObject::samples() property to a non-zero value. + For multisample framebuffer objects a color render buffer is created, + otherwise a texture with the specified texture target is created. + The color render buffer or texture will have the specified internal + format, and will be bound to the \c GL_COLOR_ATTACHMENT0 + attachment in the framebuffer object. + If you want to use a framebuffer object with multisampling enabled as a texture, you first need to copy from it to a regular framebuffer object using QGLContext::blitFramebuffer(). @@ -579,12 +595,6 @@ void QGLFramebufferObjectPrivate::init(const QSize &sz, QGLFramebufferObject::At \sa size(), texture(), attachment() */ -#ifndef QT_OPENGL_ES -#define DEFAULT_FORMAT GL_RGBA8 -#else -#define DEFAULT_FORMAT GL_RGBA -#endif - QGLFramebufferObject::QGLFramebufferObject(const QSize &size, GLenum target) : d_ptr(new QGLFramebufferObjectPrivate) { diff --git a/src/opengl/qglframebufferobject.h b/src/opengl/qglframebufferobject.h index cfc824b..ad14e50 100644 --- a/src/opengl/qglframebufferobject.h +++ b/src/opengl/qglframebufferobject.h @@ -137,18 +137,7 @@ class QGLFramebufferObjectFormatPrivate; class Q_OPENGL_EXPORT QGLFramebufferObjectFormat { public: -#if !defined(QT_OPENGL_ES) || defined(Q_QDOC) - QGLFramebufferObjectFormat(int samples = 0, - QGLFramebufferObject::Attachment attachment = QGLFramebufferObject::NoAttachment, - GLenum target = GL_TEXTURE_2D, - GLenum internalFormat = GL_RGBA8); -#else - QGLFramebufferObjectFormat(int samples = 0, - QGLFramebufferObject::Attachment attachment = QGLFramebufferObject::NoAttachment, - GLenum target = GL_TEXTURE_2D, - GLenum internalFormat = GL_RGBA); -#endif - + QGLFramebufferObjectFormat(); QGLFramebufferObjectFormat(const QGLFramebufferObjectFormat &other); QGLFramebufferObjectFormat &operator=(const QGLFramebufferObjectFormat &other); ~QGLFramebufferObjectFormat(); @@ -165,6 +154,11 @@ public: void setInternalFormat(GLenum internalFormat); GLenum internalFormat() const; +#ifdef Q_MAC_COMPAT_GL_FUNCTIONS + void setTextureTarget(QMacCompatGLenum target); + void setInternalFormat(QMacCompatGLenum internalFormat); +#endif + private: QGLFramebufferObjectFormatPrivate *d; }; diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index c51ccc7..56e5baa 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -324,7 +324,7 @@ bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const filter->setSource(generateBlurShader(radius(), quality() == Qt::SmoothTransformation)); QGLFramebufferObjectFormat format; - format.setInternalFormat(src.hasAlphaChannel() ? GL_RGBA : GL_RGB); + format.setInternalFormat(GLenum(src.hasAlphaChannel() ? GL_RGBA : GL_RGB)); QGLFramebufferObject *fbo = qgl_fbo_pool()->acquire(src.size(), format); if (!fbo) diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 5e87e96..b6f5012 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -467,7 +467,7 @@ QPaintEngine* QGLPixmapData::paintEngine() const QGLFramebufferObjectFormat format; format.setAttachment(QGLFramebufferObject::CombinedDepthStencil); format.setSamples(4); - format.setInternalFormat(m_hasAlpha ? GL_RGBA : GL_RGB); + format.setInternalFormat(GLenum(m_hasAlpha ? GL_RGBA : GL_RGB)); m_renderFbo = qgl_fbo_pool()->acquire(size(), format); diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index a59501c..f974938 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -569,7 +569,7 @@ void QGLWindowSurface::updateGeometry() QGLFramebufferObjectFormat format; format.setAttachment(QGLFramebufferObject::CombinedDepthStencil); - format.setInternalFormat(GL_RGBA); + format.setInternalFormat(GLenum(GL_RGBA)); format.setTextureTarget(target); if (QGLExtensions::glExtensions & QGLExtensions::FramebufferBlit) -- cgit v0.12 From 6dce8c6548aa63fd11ca326b8a54d5623a41573c Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Thu, 3 Sep 2009 16:18:24 +0200 Subject: Fixed tst_QGraphicsWidget::ensureClipping. The new recursive scene rendering does not call GraphicsScene::drawItems. Enabling the IndirectPainting optimization flag reverts to the old behaviour. Reviewed-by: ogoffart --- tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp index 65e6e56..03054f9 100644 --- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp +++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp @@ -2529,6 +2529,7 @@ void tst_QGraphicsWidget::ensureClipping() RectItem *childitem = new RectItem(Qt::blue, clipWidget); QGraphicsView view(&scene); + view.setOptimizationFlag(QGraphicsView::IndirectPainting); view.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&view); -- cgit v0.12 From f360180890298618ef3284c08789c2a243e1ba9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Thu, 3 Sep 2009 16:03:15 +0200 Subject: Rendering artifacts when installing an effect on HasNoContents items. QGraphicsItem::HasNoContents is documented to not paint anything when the flag is set on an item, so all the update requests are ignored. However, we cannot ignore update requests on such items when an effect is installed on them, because when the effects changes parameters it calls update on the item. We still don't paint the item, but we processes the update request such that its children can be painted properly. Reviewed-by: Andreas --- src/gui/graphicsview/qgraphicsscene.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 2ac1dca..5dd71e2 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4616,7 +4616,8 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b return; } - bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents; + bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents + && !item->d_ptr->graphicsEffect; if (!hasNoContents) { item->d_ptr->dirty = 1; if (fullItemUpdate) @@ -4706,11 +4707,15 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool return; } - const bool itemHasContents = !(item->d_ptr->flags & QGraphicsItem::ItemHasNoContents); + bool itemHasContents = !(item->d_ptr->flags & QGraphicsItem::ItemHasNoContents); const bool itemHasChildren = !item->d_ptr->children.isEmpty(); - if (!itemHasContents && !itemHasChildren) { - resetDirtyItem(item); - return; // Item has neither contents nor children!(?) + if (!itemHasContents) { + if (!itemHasChildren) { + resetDirtyItem(item); + return; // Item has neither contents nor children!(?) + } + if (item->d_ptr->graphicsEffect) + itemHasContents = true; } const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity); -- cgit v0.12 From c13b97f2f24d2ff2e62bedead5e3d50f8b992c1a Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 31 Aug 2009 16:10:23 +0200 Subject: Move the S60/Avkon framework initialization into QtGui. This way we avoid having a lot of code in a static (and unmaintainable) library. The s60main static library now currently has only one task: to call main(). To move the initialization into QtGui also meant a change in how the S60 framework is created, because we can no longer use the trick where we create and start the the S60 event loop and then have the framework call us back to start main(). The initialization now follows the creation and destruction of QApplication, which is a lot more in line with how other platforms do it. Since S60 doesn't support creating the environment, and *then* starting it (both are executed by the same call), we had to open up the S60 framework construction classes and just mirror what they do. This means that after QApplication construction is done, the S60 framework is initialized, but nothing will run yet and control will return to main(), where the user can start the event loop himself. One of the quirks of this approach is that the construction of the S60 framework makes a new cleanup stack. This means that any active traps will not be active anymore, and leaving without setting a new trap will most likely panic. This shouldn't be a problem for us, since Qt is never supposed to leave, but it means that if anyone uses the cleanup stack without setting a new trap, they will receive a panic. It was considered to add a trap mark in QApplication construction and then removing it on destruction, but it was dropped because leaving from main() is still undefined (even if the old cleanup stack would be restored in the destructor, we wouldn't be able to stop the exception from unwinding the stack, and the cleanup stack would then be unbalanced). RevBy: Jason Barron RevBy: Janne Anttila AutoTest: QWidget passed with same failure count --- mkspecs/common/symbian/symbian.conf | 4 +- mkspecs/features/symbian/default_post.prf | 2 +- src/gui/gui.pro | 5 +- src/gui/kernel/qapplication_s60.cpp | 34 ++++- src/gui/kernel/qt_s60_p.h | 1 + src/gui/kernel/qwidget_s60.cpp | 4 +- src/gui/s60framework/qs60mainapplication.cpp | 102 +++++++++++++ src/gui/s60framework/qs60mainapplication_p.h | 112 ++++++++++++++ src/gui/s60framework/qs60mainappui.cpp | 183 +++++++++++++++++++++++ src/gui/s60framework/qs60mainappui_p.h | 130 ++++++++++++++++ src/gui/s60framework/qs60maindocument.cpp | 121 +++++++++++++++ src/gui/s60framework/qs60maindocument_p.h | 139 +++++++++++++++++ src/gui/s60framework/s60framework.pri | 7 + src/s60main/qts60main.cpp | 33 +---- src/s60main/qts60main_mcrt0.cpp | 3 + src/s60main/qts60mainapplication.cpp | 91 ------------ src/s60main/qts60mainapplication_p.h | 104 ------------- src/s60main/qts60mainappui.cpp | 213 --------------------------- src/s60main/qts60mainappui_p.h | 146 ------------------ src/s60main/qts60maindocument.cpp | 117 --------------- src/s60main/qts60maindocument_p.h | 133 ----------------- src/s60main/s60main.pro | 8 +- 22 files changed, 847 insertions(+), 845 deletions(-) create mode 100644 src/gui/s60framework/qs60mainapplication.cpp create mode 100644 src/gui/s60framework/qs60mainapplication_p.h create mode 100644 src/gui/s60framework/qs60mainappui.cpp create mode 100644 src/gui/s60framework/qs60mainappui_p.h create mode 100644 src/gui/s60framework/qs60maindocument.cpp create mode 100644 src/gui/s60framework/qs60maindocument_p.h create mode 100644 src/gui/s60framework/s60framework.pri delete mode 100644 src/s60main/qts60mainapplication.cpp delete mode 100644 src/s60main/qts60mainapplication_p.h delete mode 100644 src/s60main/qts60mainappui.cpp delete mode 100644 src/s60main/qts60mainappui_p.h delete mode 100644 src/s60main/qts60maindocument.cpp delete mode 100644 src/s60main/qts60maindocument_p.h diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 3ba2a8c..abc8a7a 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -64,14 +64,14 @@ QMAKE_LINK_OBJECT_SCRIPT= object_script QMAKE_LIBS = -llibc -llibm -leuser -llibdl QMAKE_LIBS_CORE = $$QMAKE_LIBS -llibpthread -lefsrv -QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio +QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lhal -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -leikcoctl -leiksrv -lapparc QMAKE_LIBS_NETWORK = QMAKE_LIBS_EGL = -llibEGL QMAKE_LIBS_OPENGL = QMAKE_LIBS_OPENVG = -llibOpenVG QMAKE_LIBS_COMPAT = QMAKE_LIBS_QT_ENTRY = -llibcrt0.lib -QMAKE_LIBS_S60 = -lavkon -leikcoctl +QMAKE_LIBS_S60 = -lavkon !isEmpty(QMAKE_SH) { QMAKE_COPY = cp diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf index 3c2944c..7c9e8ee 100644 --- a/mkspecs/features/symbian/default_post.prf +++ b/mkspecs/features/symbian/default_post.prf @@ -4,7 +4,7 @@ contains(TEMPLATE, ".*app") { contains(CONFIG, stdbinary) { QMAKE_LIBS += } else:contains(QT, gui):contains(CONFIG,qt) { - S60MAIN_LIBS = -leuser -lavkon -leikcore -leiksrv -lws32 -lapparc -lcone -leikcoctl -lbafl -lefsrv + S60MAIN_LIBS = -leuser QMAKE_LIBS += -lqtmain.lib $$S60MAIN_LIBS } else { QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY diff --git a/src/gui/gui.pro b/src/gui/gui.pro index eb3a33f..7c24002 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -17,7 +17,10 @@ x11:include(kernel/x11.pri) mac:include(kernel/mac.pri) win32:include(kernel/win.pri) embedded:include(embedded/embedded.pri) -symbian:include(kernel/symbian.pri) +symbian { + include(kernel/symbian.pri) + include(s60framework/s60framework.pri) +} #modules include(animation/animation.pri) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 648a5d5..160c71c 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -63,10 +63,13 @@ #include "apgwgnam.h" // For CApaWindowGroupName #include // For CMdaAudioToneUtility -#if !defined(QT_NO_IM) && defined(Q_WS_S60) -#include "qinputcontext.h" -#include -#endif // !defined(QT_NO_IM) && defined(Q_WS_S60) +#if defined(Q_WS_S60) +# if !defined(QT_NO_IM) +# include "qinputcontext.h" +# include +# endif +# include +#endif #include "private/qstylesheetstyle_p.h" @@ -723,6 +726,22 @@ TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id) void qt_init(QApplicationPrivate * /* priv */, int) { + if (!CCoeEnv::Static()) { + // The S60 framework has not been initalized. We need to do it. + TApaApplicationFactory factory(NewApplication); + CApaCommandLine* commandLine = 0; + TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine); + // After this construction, CEikonEnv will be available from CEikonEnv::Static(). + // (much like our qApp). + CEikonEnv* coe = new CEikonEnv; + QT_TRAP_THROWING(coe->ConstructAppFromCommandLineL(factory,*commandLine)); + delete commandLine; + + S60->qtOwnsS60Environment = true; + } else { + S60->qtOwnsS60Environment = false; + } + #ifdef QT_NO_DEBUG if (!qgetenv("QT_S60_AUTO_FLUSH_WSERV").isEmpty()) #endif @@ -774,6 +793,13 @@ void qt_cleanup() // it dies. delete QApplicationPrivate::inputContext; QApplicationPrivate::inputContext = 0; + + if (S60->qtOwnsS60Environment) { + CEikonEnv* coe = CEikonEnv::Static(); + coe->PrepareToExit(); + // The CEikonEnv itself is destroyed in here. + coe->DestroyEnvironment(); + } } void QApplicationPrivate::initializeWidgetPaletteHash() diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 1523bcf..af5171b 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -95,6 +95,7 @@ public: int screenHeightInTwips; int defaultDpiX; int defaultDpiY; + int qtOwnsS60Environment : 1; static inline void updateScreenSize(); static inline RWsSession& wsSession(); static inline RWindowGroup& windowGroup(); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index d28e2c0..572ace8 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -722,7 +722,9 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset) // The API to get title_pane graphics size is not public -> assume square space based // on titlebar font height. CAknBitmap would be optimum, wihtout setting the size, since // then title pane would automatically scale the bitmap. Unfortunately it is not public API - const CFont * font = AknLayoutUtils::FontFromId(EAknLogicalFontTitleFont); + // Also this function is leaving, although it is not named as such. + const CFont * font; + QT_TRAP_THROWING(font = AknLayoutUtils::FontFromId(EAknLogicalFontTitleFont)); TSize iconSize(font->HeightInPixels(), font->HeightInPixels()); QIcon icon = q->windowIcon(); diff --git a/src/gui/s60framework/qs60mainapplication.cpp b/src/gui/s60framework/qs60mainapplication.cpp new file mode 100644 index 0000000..1831bce --- /dev/null +++ b/src/gui/s60framework/qs60mainapplication.cpp @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Symbian application wrapper of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// INCLUDE FILES +#include +#include "qs60maindocument_p.h" +#include "qs60mainapplication_p.h" +#include +#include + +QT_BEGIN_NAMESPACE + +/** + * factory function to create the QtS60Main application class + */ +CApaApplication* NewApplication() +{ + return new QS60MainApplication; +} + +// ============================ MEMBER FUNCTIONS =============================== + + +_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc"); + +// ----------------------------------------------------------------------------- +// QS60MainApplication::CreateDocumentL() +// Creates CApaDocument object +// ----------------------------------------------------------------------------- +// +CApaDocument* QS60MainApplication::CreateDocumentL() +{ + // Create an QtS60Main document, and return a pointer to it + return (static_cast(QS60MainDocument::NewL(*this))); +} + +// ----------------------------------------------------------------------------- +// QS60MainApplication::AppDllUid() +// Returns application UID +// ----------------------------------------------------------------------------- +// +TUid QS60MainApplication::AppDllUid() const +{ + // Return the UID for the QtS60Main application + return ProcessUid(); +} + +// ----------------------------------------------------------------------------- +// QS60MainApplication::ResourceFileName() +// Returns application resource filename +// ----------------------------------------------------------------------------- +// +TFileName QS60MainApplication::ResourceFileName() const +{ + TFindFile finder(iCoeEnv->FsSession()); + TInt err = finder.FindByDir(KQtWrapperResourceFile, KNullDesC); + if (err == KErrNone) + return finder.File(); + return KNullDesC(); +} + +QT_END_NAMESPACE + +// End of File diff --git a/src/gui/s60framework/qs60mainapplication_p.h b/src/gui/s60framework/qs60mainapplication_p.h new file mode 100644 index 0000000..52a5e37 --- /dev/null +++ b/src/gui/s60framework/qs60mainapplication_p.h @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Symbian application wrapper of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QS60MAINAPPLICATION_P_H +#define QS60MAINAPPLICATION_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +// INCLUDES +#include + +#include + +// CLASS DECLARATION + +QT_BEGIN_NAMESPACE + +CApaApplication* NewApplication(); + +static TUid ProcessUid() +{ + RProcess me; + TSecureId securId = me.SecureId(); + me.Close(); + return securId.operator TUid(); +} + +/** +* QS60MainApplication application class. +* Provides factory to create concrete document object. +* An instance of QS60MainApplication is the application part of the +* AVKON application framework for the QtS60Main example application. +*/ +class QS60MainApplication : public CAknApplication +{ +public: // Functions from base classes + + /** + * From CApaApplication, AppDllUid. + * @return Application's UID (KUidQtS60MainApp). + */ + TUid AppDllUid() const; + + /** + * From CApaApplication, ResourceFileName + * @return Application's resource filename (KUidQtS60MainApp). + */ + TFileName ResourceFileName() const; + +protected: // Functions from base classes + + /** + * From CApaApplication, CreateDocumentL. + * Creates QS60MainDocument document object. The returned + * pointer in not owned by the QS60MainApplication object. + * @return A pointer to the created document object. + */ + CApaDocument* CreateDocumentL(); +}; + +QT_END_NAMESPACE + +#endif // QS60MAINAPPLICATION_P_H + +// End of File diff --git a/src/gui/s60framework/qs60mainappui.cpp b/src/gui/s60framework/qs60mainappui.cpp new file mode 100644 index 0000000..cb56ce6 --- /dev/null +++ b/src/gui/s60framework/qs60mainappui.cpp @@ -0,0 +1,183 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Symbian application wrapper of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// INCLUDE FILES +#include +#include +#include +#include +#include +#include +#include + +#include "qs60mainappui_p.h" +#include +#include +#include + +QT_BEGIN_NAMESPACE + +// ============================ MEMBER FUNCTIONS =============================== + + +// ----------------------------------------------------------------------------- +// QS60MainAppUi::ConstructL() +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void QS60MainAppUi::ConstructL() +{ + // Cone's heap and handle checks on app destruction are not suitable for Qt apps, as many + // objects can still exist in static data at that point. Instead we will print relevant information + // so that comparative checks may be made for memory leaks, using ~SPrintExitInfo in corelib. + iEikonEnv->DisableExitChecks(ETrue); + + // Initialise app UI with standard value. + // ENoAppResourceFile and ENonStandardResourceFile makes UI to work without + // resource files in most SDKs. S60 3rd FP1 public seems to require resource file + // even these flags are defined + BaseConstructL(CAknAppUi::EAknEnableSkin); + + CEikButtonGroupContainer* nativeContainer = Cba(); + nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS); +} + +// ----------------------------------------------------------------------------- +// QS60MainAppUi::QS60MainAppUi() +// C++ default constructor can NOT contain any code, that might leave. +// ----------------------------------------------------------------------------- +// +QS60MainAppUi::QS60MainAppUi() +{ + // No implementation required +} + +// ----------------------------------------------------------------------------- +// QS60MainAppUi::~QS60MainAppUi() +// Destructor. +// ----------------------------------------------------------------------------- +// +QS60MainAppUi::~QS60MainAppUi() +{ +} + +// ----------------------------------------------------------------------------- +// QS60MainAppUi::HandleCommandL() +// Takes care of command handling. +// ----------------------------------------------------------------------------- +// +void QS60MainAppUi::HandleCommandL(TInt aCommand) +{ + if (qApp) + qApp->symbianHandleCommand(aCommand); +} + +// ----------------------------------------------------------------------------- +// QS60MainAppUi::HandleResourceChangeL() +// Takes care of event handling. +// ----------------------------------------------------------------------------- +// +void QS60MainAppUi::HandleResourceChangeL(TInt aType) +{ + CAknAppUi::HandleResourceChangeL(aType); + + if (qApp) + qApp->symbianResourceChange(aType); +} + +void QS60MainAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl *control) +{ + int result = 0; + if (qApp) + QT_TRYCATCH_LEAVING( + result = qApp->s60ProcessEvent(const_cast(&aEvent)) + ); + + if (result <= 0) + CAknAppUi::HandleWsEventL(aEvent, control); +} + + +// ----------------------------------------------------------------------------- +// Called by the framework when the application status pane +// size is changed. Passes the new client rectangle to the +// AppView +// ----------------------------------------------------------------------------- +// +void QS60MainAppUi::HandleStatusPaneSizeChange() +{ + HandleResourceChangeL(KInternalStatusPaneChange); + HandleStackedControlsResourceChange(KInternalStatusPaneChange); +} + +void QS60MainAppUi::DynInitMenuBarL(TInt, CEikMenuBar *) +{ +} + +void QS60MainAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane) +{ + if (aResourceId == R_QT_WRAPPERAPP_MENU) { + if (aMenuPane->NumberOfItemsInPane() <= 1) + qt_symbian_show_toplevel(aMenuPane); + + } else if (aResourceId != R_AVKON_MENUPANE_FEP_DEFAULT && aResourceId != R_AVKON_MENUPANE_EDITTEXT_DEFAULT && aResourceId != R_AVKON_MENUPANE_LANGUAGE_DEFAULT) { + qt_symbian_show_submenu(aMenuPane, aResourceId); + } +} + +void QS60MainAppUi::RestoreMenuL(CCoeControl* aMenuWindow, TInt aMenuId, TMenuType aMenuType) +{ + if ((aMenuId == R_QT_WRAPPERAPP_MENUBAR) || (aMenuId == R_AVKON_MENUPANE_FEP_DEFAULT)) { + TResourceReader reader; + iCoeEnv->CreateResourceReaderLC(reader, aMenuId); + aMenuWindow->ConstructFromResourceL(reader); + CleanupStack::PopAndDestroy(); + } + + if (aMenuType == EMenuPane) + DynInitMenuPaneL(aMenuId, (CEikMenuPane*)aMenuWindow); + else + DynInitMenuBarL(aMenuId, (CEikMenuBar*)aMenuWindow); +} + +QT_END_NAMESPACE + +// End of File diff --git a/src/gui/s60framework/qs60mainappui_p.h b/src/gui/s60framework/qs60mainappui_p.h new file mode 100644 index 0000000..784d0cf --- /dev/null +++ b/src/gui/s60framework/qs60mainappui_p.h @@ -0,0 +1,130 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Symbian application wrapper of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QS60MAINAPPUI_P_H +#define QS60MAINAPPUI_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +// INCLUDES +#include + +#include + +QT_BEGIN_NAMESPACE + +// FORWARD DECLARATIONS + +// CLASS DECLARATION +/** +* QS60MainAppUi application UI class. +* Interacts with the user through the UI and request message processing +* from the handler class +*/ +class QS60MainAppUi : public CAknAppUi +{ +public: // Constructors and destructor + + /** + * ConstructL. + * 2nd phase constructor. + */ + void ConstructL(); + + /** + * QS60MainAppUi. + * C++ default constructor. This needs to be public due to + * the way the framework constructs the AppUi + */ + QS60MainAppUi(); + + /** + * ~QS60MainAppUi. + * Virtual Destructor. + */ + virtual ~QS60MainAppUi(); + +protected: + void RestoreMenuL(CCoeControl* aMenuWindow,TInt aMenuId,TMenuType aMenuType); + void DynInitMenuBarL(TInt aResourceId, CEikMenuBar *aMenuBar); + void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane); + +private: // Functions from base classes + + /** + * From CEikAppUi, HandleCommandL. + * Takes care of command handling. + * @param aCommand Command to be handled. + */ + void HandleCommandL( TInt aCommand ); + + /** + * From CAknAppUi, HandleResourceChangeL + * Handles resource change events such as layout switches in global level. + * @param aType event type. + */ + void HandleResourceChangeL(TInt aType); + + /** + * HandleStatusPaneSizeChange. + * Called by the framework when the application status pane + * size is changed. + */ + void HandleStatusPaneSizeChange(); + +protected: + void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); +}; + +QT_END_NAMESPACE + +#endif // QS60MAINAPPUI_P_H + +// End of File diff --git a/src/gui/s60framework/qs60maindocument.cpp b/src/gui/s60framework/qs60maindocument.cpp new file mode 100644 index 0000000..fa663b4 --- /dev/null +++ b/src/gui/s60framework/qs60maindocument.cpp @@ -0,0 +1,121 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Symbian application wrapper of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// INCLUDE FILES +#include +#include "qs60mainappui_p.h" +#include "qs60maindocument_p.h" + +QT_BEGIN_NAMESPACE + +// ============================ MEMBER FUNCTIONS =============================== + +// ----------------------------------------------------------------------------- +// QS60MainDocument::NewL() +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +QS60MainDocument* QS60MainDocument::NewL(CEikApplication& aApp) +{ + QS60MainDocument* self = NewLC(aApp); + CleanupStack::Pop(self); + return self; +} + +// ----------------------------------------------------------------------------- +// QS60MainDocument::NewLC() +// Two-phased constructor. +// ----------------------------------------------------------------------------- +// +QS60MainDocument* QS60MainDocument::NewLC(CEikApplication& aApp) +{ + QS60MainDocument* self = new(ELeave) QS60MainDocument(aApp); + CleanupStack::PushL(self); + self->ConstructL(); + return self; +} + +// ----------------------------------------------------------------------------- +// QS60MainDocument::ConstructL() +// Symbian 2nd phase constructor can leave. +// ----------------------------------------------------------------------------- +// +void QS60MainDocument::ConstructL() +{ + // No implementation required +} + +// ----------------------------------------------------------------------------- +// QS60MainDocument::QS60MainDocument() +// C++ default constructor can NOT contain any code, that might leave. +// ----------------------------------------------------------------------------- +// +QS60MainDocument::QS60MainDocument(CEikApplication& aApp) + : CAknDocument(aApp) +{ + // No implementation required +} + +// --------------------------------------------------------------------------- +// QS60MainDocument::~QS60MainDocument() +// Destructor. +// --------------------------------------------------------------------------- +// +QS60MainDocument::~QS60MainDocument() +{ + // No implementation required +} + +// --------------------------------------------------------------------------- +// QS60MainDocument::CreateAppUiL() +// Constructs CreateAppUi. +// --------------------------------------------------------------------------- +// +CEikAppUi* QS60MainDocument::CreateAppUiL() +{ + // Create the application user interface, and return a pointer to it; + // the framework takes ownership of this object + return (static_cast (new(ELeave)QS60MainAppUi)); +} + +QT_END_NAMESPACE + +// End of File diff --git a/src/gui/s60framework/qs60maindocument_p.h b/src/gui/s60framework/qs60maindocument_p.h new file mode 100644 index 0000000..5b638cc --- /dev/null +++ b/src/gui/s60framework/qs60maindocument_p.h @@ -0,0 +1,139 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Symbian application wrapper of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QS60MAINDOCUMENT_P_H +#define QS60MAINDOCUMENT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +// INCLUDES +#include + +#include + +class CEikApplication; + +QT_BEGIN_NAMESPACE + +// FORWARD DECLARATIONS +class QS60MainAppUi; + +// CLASS DECLARATION + +/** +* QS60MainDocument application class. +* An instance of class QS60MainDocument is the Document part of the +* AVKON application framework for the QtS60Main application. +*/ +class QS60MainDocument : public CAknDocument +{ +public: // Constructors and destructor + + /** + * NewL. + * Two-phased constructor. + * Construct a QS60MainDocument for the AVKON application aApp + * using two phase construction, and return a pointer + * to the created object. + * @param aApp Application creating this document. + * @return A pointer to the created instance of QS60MainDocument. + */ + static QS60MainDocument* NewL( CEikApplication& aApp ); + + /** + * NewLC. + * Two-phased constructor. + * Construct a QS60MainDocument for the AVKON application aApp + * using two phase construction, and return a pointer + * to the created object. + * @param aApp Application creating this document. + * @return A pointer to the created instance of QS60MainDocument. + */ + static QS60MainDocument* NewLC( CEikApplication& aApp ); + + /** + * ~QS60MainDocument + * Virtual Destructor. + */ + virtual ~QS60MainDocument(); + +public: // Functions from base classes + + /** + * CreateAppUiL + * From CEikDocument, CreateAppUiL. + * Create a QS60MainAppUi object and return a pointer to it. + * The object returned is owned by the Uikon framework. + * @return Pointer to created instance of AppUi. + */ + CEikAppUi* CreateAppUiL(); + +private: // Constructors + + /** + * ConstructL + * 2nd phase constructor. + */ + void ConstructL(); + + /** + * QS60MainDocument. + * C++ default constructor. + * @param aApp Application creating this document. + */ + QS60MainDocument( CEikApplication& aApp ); + +}; + +QT_END_NAMESPACE + +#endif // QS60MAINDOCUMENT_P_H + +// End of File diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri new file mode 100644 index 0000000..f9a6d95 --- /dev/null +++ b/src/gui/s60framework/s60framework.pri @@ -0,0 +1,7 @@ +SOURCES += s60framework/qs60mainapplication.cpp \ + s60framework/qs60mainappui.cpp \ + s60framework/qs60maindocument.cpp + +HEADERS += s60framework/qs60mainapplication_p.h \ + s60framework/qs60mainappui_p.h \ + s60framework/qs60maindocument_p.h diff --git a/src/s60main/qts60main.cpp b/src/s60main/qts60main.cpp index c6e74c3..2436dee 100644 --- a/src/s60main/qts60main.cpp +++ b/src/s60main/qts60main.cpp @@ -40,20 +40,10 @@ ****************************************************************************/ // INCLUDE FILES -#include -#include -#include -#include +#include +#include -#include "qts60mainapplication_p.h" - -/** - * factory function to create the QtS60Main application class - */ -LOCAL_C CApaApplication* NewApplication() -{ - return new CQtS60MainApplication; -} +GLDEF_C TInt QtMainWrapper(); /** * A normal Symbian OS executable provides an E32Main() function which is @@ -61,17 +51,10 @@ LOCAL_C CApaApplication* NewApplication() */ GLDEF_C TInt E32Main() { - TApaApplicationFactory factory(NewApplication); - CApaCommandLine* commandLine=NULL; - TInt err = CApaCommandLine::GetCommandLineFromProcessEnvironment(commandLine); - CEikonEnv* coe=new CEikonEnv; - TRAP(err, coe->ConstructAppFromCommandLineL(factory,*commandLine)); - delete commandLine; - - CActiveScheduler::Start(); - - coe->PrepareToExit(); - coe->DestroyEnvironment(); + CTrapCleanup *cleanupStack = q_check_ptr(CTrapCleanup::New()); + TInt err = 0; + TRAP(err, QtMainWrapper()); + delete cleanupStack; - return 0; + return err; } diff --git a/src/s60main/qts60main_mcrt0.cpp b/src/s60main/qts60main_mcrt0.cpp index c250b61..22321e6 100644 --- a/src/s60main/qts60main_mcrt0.cpp +++ b/src/s60main/qts60main_mcrt0.cpp @@ -51,6 +51,9 @@ #include #include "estlib.h" +// Needed for QT_TRYCATCH_LEAVING. +#include + #ifdef __ARMCC__ __asm int CallMain(int argc, char *argv[], char *envp[]) { diff --git a/src/s60main/qts60mainapplication.cpp b/src/s60main/qts60mainapplication.cpp deleted file mode 100644 index 11ade1b..0000000 --- a/src/s60main/qts60mainapplication.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Symbian application wrapper of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// INCLUDE FILES -#include -#include "qts60maindocument_p.h" -#include "qts60mainapplication_p.h" -#include -#include - -// ============================ MEMBER FUNCTIONS =============================== - - -_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc"); - -// ----------------------------------------------------------------------------- -// CQtS60MainApplication::CreateDocumentL() -// Creates CApaDocument object -// ----------------------------------------------------------------------------- -// -CApaDocument* CQtS60MainApplication::CreateDocumentL() -{ - // Create an QtS60Main document, and return a pointer to it - return (static_cast(CQtS60MainDocument::NewL(*this))); -} - -// ----------------------------------------------------------------------------- -// CQtS60MainApplication::AppDllUid() -// Returns application UID -// ----------------------------------------------------------------------------- -// -TUid CQtS60MainApplication::AppDllUid() const -{ - // Return the UID for the QtS60Main application - return ProcessUid(); -} - -// ----------------------------------------------------------------------------- -// CQtS60MainApplication::ResourceFileName() -// Returns application resource filename -// ----------------------------------------------------------------------------- -// -TFileName CQtS60MainApplication::ResourceFileName() const -{ - TFindFile finder(iCoeEnv->FsSession()); - TInt err = finder.FindByDir(KQtWrapperResourceFile, KNullDesC); - if (err == KErrNone) - return finder.File(); - return KNullDesC(); -} - - -// End of File diff --git a/src/s60main/qts60mainapplication_p.h b/src/s60main/qts60mainapplication_p.h deleted file mode 100644 index 0d662ff..0000000 --- a/src/s60main/qts60mainapplication_p.h +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Symbian application wrapper of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef __QtS60MainAPPLICATION_H__ -#define __QtS60MainAPPLICATION_H__ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -// INCLUDES -#include - -// CLASS DECLARATION - -static TUid ProcessUid() - { - RProcess me; - TSecureId securId = me.SecureId(); - me.Close(); - return securId.operator TUid(); - } - -/** -* CQtS60MainApplication application class. -* Provides factory to create concrete document object. -* An instance of CQtS60MainApplication is the application part of the -* AVKON application framework for the QtS60Main example application. -*/ -class CQtS60MainApplication : public CAknApplication - { - public: // Functions from base classes - - /** - * From CApaApplication, AppDllUid. - * @return Application's UID (KUidQtS60MainApp). - */ - TUid AppDllUid() const; - - /** - * From CApaApplication, ResourceFileName - * @return Application's resource filename (KUidQtS60MainApp). - */ - TFileName ResourceFileName() const; - - protected: // Functions from base classes - - /** - * From CApaApplication, CreateDocumentL. - * Creates CQtS60MainDocument document object. The returned - * pointer in not owned by the CQtS60MainApplication object. - * @return A pointer to the created document object. - */ - CApaDocument* CreateDocumentL(); - }; - -#endif // __QtS60MainAPPLICATION_H__ - -// End of File diff --git a/src/s60main/qts60mainappui.cpp b/src/s60main/qts60mainappui.cpp deleted file mode 100644 index 2f3d925..0000000 --- a/src/s60main/qts60mainappui.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Symbian application wrapper of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include - -#include "qts60mainappui_p.h" -#include -#include -#include - -// ============================ MEMBER FUNCTIONS =============================== - - -// ----------------------------------------------------------------------------- -// CQtS60MainAppUi::ConstructL() -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CQtS60MainAppUi::ConstructL() -{ - // Cone's heap and handle checks on app destruction are not suitable for Qt apps, as many - // objects can still exist in static data at that point. Instead we will print relevant information - // so that comparative checks may be made for memory leaks, using ~SPrintExitInfo in corelib. - iEikonEnv->DisableExitChecks(ETrue); - - // Initialise app UI with standard value. - // ENoAppResourceFile and ENonStandardResourceFile makes UI to work without - // resource files in most SDKs. S60 3rd FP1 public seems to require resource file - // even these flags are defined - BaseConstructL(CAknAppUi::EAknEnableSkin); - - CEikButtonGroupContainer* nativeContainer = Cba(); - nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS); - - // Create async callback to call Qt main, - // this is required to give S60 app FW to finish starting correctly - TCallBack callBack(OpenCMainStaticCallBack, this); - iAsyncCallBack = new(ELeave) CAsyncCallBack(callBack, CActive::EPriorityIdle); - iAsyncCallBack->Call(); -} - -// ----------------------------------------------------------------------------- -// CQtS60MainAppUi::CQtS60MainAppUi() -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CQtS60MainAppUi::CQtS60MainAppUi() -{ - // No implementation required -} - -// ----------------------------------------------------------------------------- -// CQtS60MainAppUi::~CQtS60MainAppUi() -// Destructor. -// ----------------------------------------------------------------------------- -// -CQtS60MainAppUi::~CQtS60MainAppUi() -{ - delete iAsyncCallBack; -} - -// ----------------------------------------------------------------------------- -// CQtS60MainAppUi::HandleCommandL() -// Takes care of command handling. -// ----------------------------------------------------------------------------- -// -void CQtS60MainAppUi::HandleCommandL(TInt aCommand) -{ - if (qApp) - qApp->symbianHandleCommand(aCommand); -} - -// ----------------------------------------------------------------------------- -// CQtS60MainAppUi::HandleResourceChangeL() -// Takes care of event handling. -// ----------------------------------------------------------------------------- -// -void CQtS60MainAppUi::HandleResourceChangeL(TInt aType) -{ - CAknAppUi::HandleResourceChangeL(aType); - - if (qApp) - qApp->symbianResourceChange(aType); -} - -void CQtS60MainAppUi::HandleWsEventL(const TWsEvent& aEvent, CCoeControl *control) -{ - int result = 0; - if (qApp) - QT_TRYCATCH_LEAVING( - result = qApp->s60ProcessEvent(const_cast(&aEvent)) - ); - - if (result <= 0) - CAknAppUi::HandleWsEventL(aEvent, control); -} - - -// ----------------------------------------------------------------------------- -// Called by the framework when the application status pane -// size is changed. Passes the new client rectangle to the -// AppView -// ----------------------------------------------------------------------------- -// -void CQtS60MainAppUi::HandleStatusPaneSizeChange() -{ - HandleResourceChangeL(KInternalStatusPaneChange); - HandleStackedControlsResourceChange(KInternalStatusPaneChange); -} - -// ----------------------------------------------------------------------------- -// Called asynchronously from ConstructL() - passes call to nan static method -// ----------------------------------------------------------------------------- -// -TInt CQtS60MainAppUi::OpenCMainStaticCallBack(TAny* aObject) -{ - CQtS60MainAppUi* myObj = static_cast(aObject); - myObj->OpenCMainCallBack(); - return 0; -} - -#include "qtS60main_mcrt0.cpp" - -// ----------------------------------------------------------------------------- -// Invokes Qt main, the Qt main will block and when we return from there -// application should be closed. -> Call Exit(); -// ----------------------------------------------------------------------------- -// -void CQtS60MainAppUi::OpenCMainCallBack() -{ - TInt ret; - TRAPD(err, ret = QtMainWrapper()); - Q_UNUSED(ret); - Q_UNUSED(err); - Exit(); -} - -void CQtS60MainAppUi::DynInitMenuBarL(TInt, CEikMenuBar *) -{ -} - -void CQtS60MainAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane) -{ - if (aResourceId == R_QT_WRAPPERAPP_MENU) { - if (aMenuPane->NumberOfItemsInPane() <= 1) - qt_symbian_show_toplevel(aMenuPane); - - } else if (aResourceId != R_AVKON_MENUPANE_FEP_DEFAULT && aResourceId != R_AVKON_MENUPANE_EDITTEXT_DEFAULT && aResourceId != R_AVKON_MENUPANE_LANGUAGE_DEFAULT) { - qt_symbian_show_submenu(aMenuPane, aResourceId); - } -} - -void CQtS60MainAppUi::RestoreMenuL(CCoeControl* aMenuWindow, TInt aMenuId, TMenuType aMenuType) -{ - if ((aMenuId == R_QT_WRAPPERAPP_MENUBAR) || (aMenuId == R_AVKON_MENUPANE_FEP_DEFAULT)) { - TResourceReader reader; - iCoeEnv->CreateResourceReaderLC(reader, aMenuId); - aMenuWindow->ConstructFromResourceL(reader); - CleanupStack::PopAndDestroy(); - } - - if (aMenuType == EMenuPane) - DynInitMenuPaneL(aMenuId, (CEikMenuPane*)aMenuWindow); - else - DynInitMenuBarL(aMenuId, (CEikMenuBar*)aMenuWindow); -} - -// End of File diff --git a/src/s60main/qts60mainappui_p.h b/src/s60main/qts60mainappui_p.h deleted file mode 100644 index 737dcda..0000000 --- a/src/s60main/qts60mainappui_p.h +++ /dev/null @@ -1,146 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Symbian application wrapper of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef __QtS60MainAPPUI_H__ -#define __QtS60MainAPPUI_H__ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -// INCLUDES -#include - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -/** -* CQtS60MainAppUi application UI class. -* Interacts with the user through the UI and request message processing -* from the handler class -*/ -class CQtS60MainAppUi : public CAknAppUi - { - public: // Constructors and destructor - - /** - * ConstructL. - * 2nd phase constructor. - */ - void ConstructL(); - - /** - * CQtS60MainAppUi. - * C++ default constructor. This needs to be public due to - * the way the framework constructs the AppUi - */ - CQtS60MainAppUi(); - - /** - * ~CQtS60MainAppUi. - * Virtual Destructor. - */ - virtual ~CQtS60MainAppUi(); - - protected: - void RestoreMenuL(CCoeControl* aMenuWindow,TInt aMenuId,TMenuType aMenuType); - void DynInitMenuBarL(TInt aResourceId, CEikMenuBar *aMenuBar); - void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane); - - private: // Functions from base classes - - /** - * From CEikAppUi, HandleCommandL. - * Takes care of command handling. - * @param aCommand Command to be handled. - */ - void HandleCommandL( TInt aCommand ); - - /** - * From CAknAppUi, HandleResourceChangeL - * Handles resource change events such as layout switches in global level. - * @param aType event type. - */ - void HandleResourceChangeL(TInt aType); - - /** - * HandleStatusPaneSizeChange. - * Called by the framework when the application status pane - * size is changed. - */ - void HandleStatusPaneSizeChange(); - - /** - * Static callback method for invoking Qt main. - * Called asynchronously from ConstructL() - passes call to non static method. - */ - static TInt OpenCMainStaticCallBack( TAny* aObject ); - - /** - * Callback method for invoking Qt main. - * Called from static OpenCMainStaticCallBack. - */ - void OpenCMainCallBack(); - - protected: - void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); - - - private: // Data - - /** - * Async callback object to call Qt main - * Owned by CQtS60MainAppUi - */ - CAsyncCallBack* iAsyncCallBack; - - }; - -#endif // __QtS60MainAPPUI_H__ - -// End of File diff --git a/src/s60main/qts60maindocument.cpp b/src/s60main/qts60maindocument.cpp deleted file mode 100644 index a42fe59..0000000 --- a/src/s60main/qts60maindocument.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Symbian application wrapper of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// INCLUDE FILES -#include -#include "qts60mainappui_p.h" -#include "qts60maindocument_p.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CQtS60MainDocument::NewL() -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CQtS60MainDocument* CQtS60MainDocument::NewL(CEikApplication& aApp) -{ - CQtS60MainDocument* self = NewLC(aApp); - CleanupStack::Pop(self); - return self; -} - -// ----------------------------------------------------------------------------- -// CQtS60MainDocument::NewLC() -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -CQtS60MainDocument* CQtS60MainDocument::NewLC(CEikApplication& aApp) -{ - CQtS60MainDocument* self = new(ELeave) CQtS60MainDocument(aApp); - CleanupStack::PushL(self); - self->ConstructL(); - return self; -} - -// ----------------------------------------------------------------------------- -// CQtS60MainDocument::ConstructL() -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CQtS60MainDocument::ConstructL() -{ - // No implementation required -} - -// ----------------------------------------------------------------------------- -// CQtS60MainDocument::CQtS60MainDocument() -// C++ default constructor can NOT contain any code, that might leave. -// ----------------------------------------------------------------------------- -// -CQtS60MainDocument::CQtS60MainDocument(CEikApplication& aApp) - : CAknDocument(aApp) -{ - // No implementation required -} - -// --------------------------------------------------------------------------- -// CQtS60MainDocument::~CQtS60MainDocument() -// Destructor. -// --------------------------------------------------------------------------- -// -CQtS60MainDocument::~CQtS60MainDocument() -{ - // No implementation required -} - -// --------------------------------------------------------------------------- -// CQtS60MainDocument::CreateAppUiL() -// Constructs CreateAppUi. -// --------------------------------------------------------------------------- -// -CEikAppUi* CQtS60MainDocument::CreateAppUiL() -{ - // Create the application user interface, and return a pointer to it; - // the framework takes ownership of this object - return (static_cast (new(ELeave)CQtS60MainAppUi)); -} - -// End of File diff --git a/src/s60main/qts60maindocument_p.h b/src/s60main/qts60maindocument_p.h deleted file mode 100644 index dfdac5f..0000000 --- a/src/s60main/qts60maindocument_p.h +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Symbian application wrapper of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef __QTS60MAINDOCUMENT_H__ -#define __QTS60MAINDOCUMENT_H__ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CQtS60MainAppUi; -class CEikApplication; - - -// CLASS DECLARATION - -/** -* CQtS60MainDocument application class. -* An instance of class CQtS60MainDocument is the Document part of the -* AVKON application framework for the QtS60Main application. -*/ -class CQtS60MainDocument : public CAknDocument - { - public: // Constructors and destructor - - /** - * NewL. - * Two-phased constructor. - * Construct a CQtS60MainDocument for the AVKON application aApp - * using two phase construction, and return a pointer - * to the created object. - * @param aApp Application creating this document. - * @return A pointer to the created instance of CQtS60MainDocument. - */ - static CQtS60MainDocument* NewL( CEikApplication& aApp ); - - /** - * NewLC. - * Two-phased constructor. - * Construct a CQtS60MainDocument for the AVKON application aApp - * using two phase construction, and return a pointer - * to the created object. - * @param aApp Application creating this document. - * @return A pointer to the created instance of CQtS60MainDocument. - */ - static CQtS60MainDocument* NewLC( CEikApplication& aApp ); - - /** - * ~CQtS60MainDocument - * Virtual Destructor. - */ - virtual ~CQtS60MainDocument(); - - public: // Functions from base classes - - /** - * CreateAppUiL - * From CEikDocument, CreateAppUiL. - * Create a CQtS60MainAppUi object and return a pointer to it. - * The object returned is owned by the Uikon framework. - * @return Pointer to created instance of AppUi. - */ - CEikAppUi* CreateAppUiL(); - - private: // Constructors - - /** - * ConstructL - * 2nd phase constructor. - */ - void ConstructL(); - - /** - * CQtS60MainDocument. - * C++ default constructor. - * @param aApp Application creating this document. - */ - CQtS60MainDocument( CEikApplication& aApp ); - - }; - -#endif // __QTS60MAINDOCUMENT_H__ - -// End of File diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index a4833af..cc3c547 100644 --- a/src/s60main/s60main.pro +++ b/src/s60main/s60main.pro @@ -14,13 +14,7 @@ symbian { CONFIG -= jpeg INCLUDEPATH += tmp $$QMAKE_INCDIR_QT/QtCore $$MW_LAYER_SYSTEMINCLUDE SOURCES = qts60main.cpp \ - qts60mainapplication.cpp \ - qts60mainappui.cpp \ - qts60maindocument.cpp - - HEADERS = qts60mainapplication_p.h \ - qts60mainappui_p.h \ - qts60maindocument_p.h + qts60main_mcrt0.cpp # This block serves the minimalistic resource file for S60 3.1 platforms. # Note there is no way to ifdef S60 version in mmp file, that is why the resource -- cgit v0.12 From a13737c56e9c23f5edb2fd623a09d08a7d8ce83a Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Thu, 3 Sep 2009 16:59:48 +0200 Subject: Unbreak static compile (due to symbol conflicts). Rename the hex-to-RGB routines to avoid conflicts with the same functions in QtGui. We do not really want to export this function. Beside, we want to clean-up and simplify the case for #rrggbb only (the most common one for SVG). --- src/svg/qsvghandler.cpp | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index b7b041f..e2c3d92 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -78,7 +78,7 @@ double qstrtod(const char *s00, char const **se, bool *ok); // ======== duplicated from qcolor_p -static inline int h2i(char hex) +static inline int qsvg_h2i(char hex) { if (hex >= '0' && hex <= '9') return hex - '0'; @@ -89,18 +89,18 @@ static inline int h2i(char hex) return -1; } -static inline int hex2int(const char *s) +static inline int qsvg_hex2int(const char *s) { - return (h2i(s[0]) << 4) | h2i(s[1]); + return (qsvg_h2i(s[0]) << 4) | qsvg_h2i(s[1]); } -static inline int hex2int(char s) +static inline int qsvg_hex2int(char s) { - int h = h2i(s); + int h = qsvg_h2i(s); return (h << 4) | h; } -bool qt_get_hex_rgb(const char *name, QRgb *rgb) +bool qsvg_get_hex_rgb(const char *name, QRgb *rgb) { if(name[0] != '#') return false; @@ -108,21 +108,21 @@ bool qt_get_hex_rgb(const char *name, QRgb *rgb) int len = qstrlen(name); int r, g, b; if (len == 12) { - r = hex2int(name); - g = hex2int(name + 4); - b = hex2int(name + 8); + r = qsvg_hex2int(name); + g = qsvg_hex2int(name + 4); + b = qsvg_hex2int(name + 8); } else if (len == 9) { - r = hex2int(name); - g = hex2int(name + 3); - b = hex2int(name + 6); + r = qsvg_hex2int(name); + g = qsvg_hex2int(name + 3); + b = qsvg_hex2int(name + 6); } else if (len == 6) { - r = hex2int(name); - g = hex2int(name + 2); - b = hex2int(name + 4); + r = qsvg_hex2int(name); + g = qsvg_hex2int(name + 2); + b = qsvg_hex2int(name + 4); } else if (len == 3) { - r = hex2int(name[0]); - g = hex2int(name[1]); - b = hex2int(name[2]); + r = qsvg_hex2int(name[0]); + g = qsvg_hex2int(name[1]); + b = qsvg_hex2int(name[2]); } else { r = g = b = -1; } @@ -134,7 +134,7 @@ bool qt_get_hex_rgb(const char *name, QRgb *rgb) return true; } -bool qt_get_hex_rgb(const QChar *str, int len, QRgb *rgb) +bool qsvg_get_hex_rgb(const QChar *str, int len, QRgb *rgb) { if (len > 13) return false; @@ -142,7 +142,7 @@ bool qt_get_hex_rgb(const QChar *str, int len, QRgb *rgb) for(int i = 0; i < len; ++i) tmp[i] = str[i].toLatin1(); tmp[len] = 0; - return qt_get_hex_rgb(tmp, rgb); + return qsvg_get_hex_rgb(tmp, rgb); } // ======== end of qcolor_p duplicate @@ -801,7 +801,7 @@ static bool resolveColor(const QStringRef &colorStr, QColor &color, QSvgHandler // #rrggbb is very very common, so let's tackle it here // rather than falling back to QColor QRgb rgb; - bool ok = qt_get_hex_rgb(colorStrTr.unicode(), colorStrTr.length(), &rgb); + bool ok = qsvg_get_hex_rgb(colorStrTr.unicode(), colorStrTr.length(), &rgb); if (ok) color.setRgb(rgb); return ok; -- cgit v0.12 From 09e700f1d2a15ea4a596045496674c4d2521f5f8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 3 Sep 2009 17:19:03 +0200 Subject: Removing a few superfluous semicolons. Reviewed-By: TrustMe --- src/gui/dialogs/qdialog_p.h | 2 +- src/gui/dialogs/qprintdialog_unix.cpp | 8 ++++---- src/gui/graphicsview/qgraphicsanchorlayout_p.h | 4 ++-- src/gui/graphicsview/qsimplex_p.h | 4 ++-- src/gui/image/qiconloader_p.h | 2 +- src/gui/itemviews/qcolumnview_p.h | 4 ++-- src/gui/kernel/qapplication.h | 2 +- src/gui/kernel/qwidget.h | 2 +- src/gui/text/qfontdatabase.cpp | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/gui/dialogs/qdialog_p.h b/src/gui/dialogs/qdialog_p.h index 5239d09..a90d6e6 100644 --- a/src/gui/dialogs/qdialog_p.h +++ b/src/gui/dialogs/qdialog_p.h @@ -98,7 +98,7 @@ public: #endif #ifdef Q_WS_MAC - virtual void mac_nativeDialogModalHelp(){}; + virtual void mac_nativeDialogModalHelp() {} #endif int rescode; diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp index 54e0046..cb19511 100644 --- a/src/gui/dialogs/qprintdialog_unix.cpp +++ b/src/gui/dialogs/qprintdialog_unix.cpp @@ -193,12 +193,12 @@ public: description(desc), selected(-1), selDescription(0), - parentItem(pi) {}; + parentItem(pi) {} ~QOptionTreeItem() { while (!childItems.isEmpty()) delete childItems.takeFirst(); - }; + } ItemType type; int index; @@ -238,8 +238,8 @@ class QPPDOptionsEditor : public QStyledItemDelegate { Q_OBJECT public: - QPPDOptionsEditor(QObject* parent = 0) : QStyledItemDelegate(parent) {}; - ~QPPDOptionsEditor() {}; + QPPDOptionsEditor(QObject* parent = 0) : QStyledItemDelegate(parent) {} + ~QPPDOptionsEditor() {} QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; void setEditorData(QWidget* editor, const QModelIndex& index) const; diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index b64f787..098407c 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -170,7 +170,7 @@ struct AnchorData : public QSimplexVariable { skipInPreferred(0), type(Normal), hasSize(false), isLayoutAnchor(false) {} - virtual void updateChildrenSizes() { }; + virtual void updateChildrenSizes() {} virtual void refreshSizeHints(qreal effectiveSpacing); virtual ~AnchorData() {} @@ -299,7 +299,7 @@ struct ParallelAnchorData : public AnchorData class GraphPath { public: - GraphPath() {}; + GraphPath() {} QSimplexConstraint *constraint(const GraphPath &path) const; #ifdef QT_DEBUG diff --git a/src/gui/graphicsview/qsimplex_p.h b/src/gui/graphicsview/qsimplex_p.h index 9ee3863..eac74ac 100644 --- a/src/gui/graphicsview/qsimplex_p.h +++ b/src/gui/graphicsview/qsimplex_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE struct QSimplexVariable { - QSimplexVariable() : result(0), index(0) {}; + QSimplexVariable() : result(0), index(0) {} qreal result; uint index; @@ -80,7 +80,7 @@ struct QSimplexVariable */ struct QSimplexConstraint { - QSimplexConstraint() : constant(0), ratio(Equal), artificial(0) {}; + QSimplexConstraint() : constant(0), ratio(Equal), artificial(0) {} enum Ratio { LessOrEqual = 0, diff --git a/src/gui/image/qiconloader_p.h b/src/gui/image/qiconloader_p.h index ba05a54..8c1cd4e 100644 --- a/src/gui/image/qiconloader_p.h +++ b/src/gui/image/qiconloader_p.h @@ -139,7 +139,7 @@ class QIconTheme { public: QIconTheme(const QString &name); - QIconTheme() : m_valid(false) {}; + QIconTheme() : m_valid(false) {} QStringList parents() { return m_parents; } QList keyList() { return m_keyList; } QString contentDir() { return m_contentDir; } diff --git a/src/gui/itemviews/qcolumnview_p.h b/src/gui/itemviews/qcolumnview_p.h index 97def07..ca1d334 100644 --- a/src/gui/itemviews/qcolumnview_p.h +++ b/src/gui/itemviews/qcolumnview_p.h @@ -174,8 +174,8 @@ class QColumnViewDelegate : public QItemDelegate { public: - explicit QColumnViewDelegate(QObject *parent = 0) : QItemDelegate(parent) {}; - ~QColumnViewDelegate() {}; + explicit QColumnViewDelegate(QObject *parent = 0) : QItemDelegate(parent) {} + ~QColumnViewDelegate() {} void paint(QPainter *painter, const QStyleOptionViewItem &option, diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h index 92cf0f8..f1e3cb0 100644 --- a/src/gui/kernel/qapplication.h +++ b/src/gui/kernel/qapplication.h @@ -327,7 +327,7 @@ public: { if (replace) changeOverrideCursor(cursor); else setOverrideCursor(cursor); } # endif inline static QT3_SUPPORT bool hasGlobalMouseTracking() {return true;} - inline static QT3_SUPPORT void setGlobalMouseTracking(bool) {}; + inline static QT3_SUPPORT void setGlobalMouseTracking(bool) {} inline static QT3_SUPPORT void flushX() { flush(); } static inline QT3_SUPPORT void setWinStyleHighlightColor(const QColor &c) { QPalette p(palette()); diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h index f398dbd..284558f 100644 --- a/src/gui/kernel/qwidget.h +++ b/src/gui/kernel/qwidget.h @@ -830,7 +830,7 @@ public: inline QT3_SUPPORT void setFont(const QFont &f, bool) { setFont(f); } inline QT3_SUPPORT void setPalette(const QPalette &p, bool) { setPalette(p); } enum BackgroundOrigin { WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin }; - inline QT3_SUPPORT void setBackgroundOrigin(BackgroundOrigin){}; + inline QT3_SUPPORT void setBackgroundOrigin(BackgroundOrigin) {} inline QT3_SUPPORT BackgroundOrigin backgroundOrigin() const { return WindowOrigin; } inline QT3_SUPPORT QPoint backgroundOffset() const { return QPoint(); } inline QT3_SUPPORT void repaint(bool) { repaint(); } diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 0e2dc31..78847ef 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -595,7 +595,7 @@ static QList determineWritingSystemsFromTrueTypeBi class QFontDatabaseS60Store { public: - virtual ~QFontDatabaseS60Store() {}; + virtual ~QFontDatabaseS60Store() {} }; #endif -- cgit v0.12 From 65d4bca69eeceef7af247f3683f8844e07fce771 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Thu, 3 Sep 2009 18:52:01 +0200 Subject: QCSSScanner: really skip toLower() when tokenizing the input. Missing from e3c62dc1def9270761ca63c73ae76fdca9d61582 is the actual change to the (generated) scanner, namely to skip lowercase conversion for each and every character. --- src/gui/text/qcssscanner.cpp | 2 +- util/lexgen/css2-simplified.lexgen | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qcssscanner.cpp b/src/gui/text/qcssscanner.cpp index 06a13de..5bbf638 100644 --- a/src/gui/text/qcssscanner.cpp +++ b/src/gui/text/qcssscanner.cpp @@ -46,7 +46,7 @@ public: QCssScanner_Generated(const QString &inp); inline QChar next() { - return (pos < input.length()) ? input.at(pos++).toLower() : QChar(); + return (pos < input.length()) ? input.at(pos++) : QChar(); } int handleCommentStart(); int lex(); diff --git a/util/lexgen/css2-simplified.lexgen b/util/lexgen/css2-simplified.lexgen index 299ff5e..53facb1 100644 --- a/util/lexgen/css2-simplified.lexgen +++ b/util/lexgen/css2-simplified.lexgen @@ -1,4 +1,5 @@ [Options] +case-sensitive classname = QCssScanner_Generated [Code Generator Options] -- cgit v0.12 From 437b4f6d44beeb48679da86a0a8eb825ba86c7db Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 3 Sep 2009 20:21:08 +0200 Subject: QStyleSheetStyle test: test that the widget loose their style when they are not hovered --- .../auto/qstylesheetstyle/tst_qstylesheetstyle.cpp | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp index 4c8f689..55b6e96 100644 --- a/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp +++ b/tests/auto/qstylesheetstyle/tst_qstylesheetstyle.cpp @@ -845,6 +845,7 @@ void tst_QStyleSheetStyle::hoverColors() #endif QApplication::setActiveWindow(&frame); QTest::qWait(60); + //move the mouse inside the widget, it should be colored QTest::mouseMove ( widget, QPoint(5,5)); QTest::qWait(60); @@ -857,6 +858,32 @@ void tst_QStyleSheetStyle::hoverColors() QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)), (QString::fromLatin1(widget->metaObject()->className()) + " did not contain text color #ff0084").toLocal8Bit().constData()); + + //move the mouse outside the widget, it should NOT be colored + QTest::mouseMove ( dummy, QPoint(5,5)); + QTest::qWait(60); + + frame.render(&image); + + QVERIFY2(!testForColors(image, QColor(0xe8, 0xff, 0x66)), + (QString::fromLatin1(widget->metaObject()->className()) + + " did contain background color #e8ff66").toLocal8Bit().constData()); + QVERIFY2(!testForColors(image, QColor(0xff, 0x00, 0x84)), + (QString::fromLatin1(widget->metaObject()->className()) + + " did contain text color #ff0084").toLocal8Bit().constData()); + + //move the mouse again inside the widget, it should be colored + QTest::mouseMove (widget, QPoint(5,5)); + QTest::qWait(60); + + frame.render(&image); + + QVERIFY2(testForColors(image, QColor(0xe8, 0xff, 0x66)), + (QString::fromLatin1(widget->metaObject()->className()) + + " did not contain background color #e8ff66").toLocal8Bit().constData()); + QVERIFY2(testForColors(image, QColor(0xff, 0x00, 0x84)), + (QString::fromLatin1(widget->metaObject()->className()) + + " did not contain text color #ff0084").toLocal8Bit().constData()); } } -- cgit v0.12 From 4c501d7fce503a610edabfba5d6efc3ef2778bef Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 3 Sep 2009 20:33:55 +0200 Subject: Fix tst_QTableView with skulpture style --- tests/auto/qtableview/tst_qtableview.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 39ab4c6..6fe2963 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -2487,6 +2487,11 @@ void tst_QTableView::indexAt() QtTestTableView view; view.show(); + + //some styles change the scroll mode in their polish + view.setHorizontalScrollMode(QAbstractItemView::ScrollPerItem); + view.setVerticalScrollMode(QAbstractItemView::ScrollPerItem); + view.setModel(&model); view.setSpan(row, column, rowSpan, columnSpan); view.hideRow(hiddenRow); @@ -3143,6 +3148,10 @@ void tst_QTableView::task240266_veryBigColumn() table.show(); QTest::qWait(100); + //some styles change the scroll mode in their polish + table.setHorizontalScrollMode(QAbstractItemView::ScrollPerItem); + table.setVerticalScrollMode(QAbstractItemView::ScrollPerItem); + QScrollBar *scroll = table.horizontalScrollBar(); QCOMPARE(scroll->minimum(), 0); QCOMPARE(scroll->maximum(), model.columnCount() - 1); -- cgit v0.12 From 9e57401d403ca31a880636ab91301158a085de09 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 4 Sep 2009 10:23:42 +1000 Subject: Use qreal for QGraphicsOpacityEffect opacity property. Reviewed-by: Yann Bodson --- src/gui/effects/qgraphicseffect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/effects/qgraphicseffect.h b/src/gui/effects/qgraphicseffect.h index 8e5384c..ca3f778 100644 --- a/src/gui/effects/qgraphicseffect.h +++ b/src/gui/effects/qgraphicseffect.h @@ -274,7 +274,7 @@ class QGraphicsOpacityEffectPrivate; class Q_GUI_EXPORT QGraphicsOpacityEffect: public QGraphicsEffect { Q_OBJECT - Q_PROPERTY(int opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) + Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) Q_PROPERTY(QBrush opacityMask READ opacityMask WRITE setOpacityMask NOTIFY opacityMaskChanged) public: QGraphicsOpacityEffect(QObject *parent = 0); -- cgit v0.12 From dbcd5955769f2a7b23b1b6f91211ed8160a66859 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Wed, 2 Sep 2009 15:08:03 -0700 Subject: Fix a bug in DFBWindowSurface::setGeometry Make sure to release the surface of a window before resizing. Seemingly certain versions of DirectFB change the surface when the window is resized. Also clean up setGeometry() Reviewed-by: Donald Carr --- .../gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 57 ++++++++++++---------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 9e0691d..58f7098 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -184,11 +184,23 @@ static DFBResult setWindowGeometry(IDirectFBWindow *dfbWindow, const QRect &old, void QDirectFBWindowSurface::setGeometry(const QRect &rect) { + const QRect oldRect = geometry(); + if (oldRect == rect) + return; + IDirectFBSurface *oldSurface = dfbSurface; -#ifdef QT_NO_DIRECTFB_WM - IDirectFBSurface *primarySurface = screen->primarySurface(); - Q_ASSERT(primarySurface); + const bool sizeChanged = oldRect.size() != rect.size(); + if (sizeChanged) { + delete engine; + engine = 0; + unlockSurface(); +#ifdef QT_DIRECTFB_SUBSURFACE + releaseSubSurface(); #endif + releaseSurface(); + Q_ASSERT(!dfbSurface); + } + if (rect.isNull()) { #ifndef QT_NO_DIRECTFB_WM if (dfbWindow) { @@ -196,27 +208,25 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) dfbWindow = 0; } #endif - if (dfbSurface) { -#ifdef QT_NO_DIRECTFB_WM - if (dfbSurface != primarySurface) + Q_ASSERT(!dfbSurface); +#ifdef QT_DIRECTFB_SUBSURFACE + Q_ASSERT(!subSurface); #endif - dfbSurface->Release(dfbSurface); - dfbSurface = 0; - } - } else if (rect != geometry()) { - const QRect oldRect = geometry(); - DFBResult result = DFB_OK; - // If we're in a resize, the surface shouldn't be locked + } else { #ifdef QT_DIRECTFB_WM if (!dfbWindow) { createWindow(rect); } else { setWindowGeometry(dfbWindow, oldRect, rect); + Q_ASSERT(!sizeChanged || !dfbSurface); + if (sizeChanged) + dfbWindow->GetSurface(dfbWindow, &dfbSurface); } #else + IDirectFBSurface *primarySurface = screen->primarySurface(); + DFBResult result = DFB_OK; if (mode == Primary) { - if (dfbSurface && dfbSurface != primarySurface) - dfbSurface->Release(dfbSurface); + Q_ASSERT(primarySurface); if (rect == screen->region().boundingRect()) { dfbSurface = primarySurface; } else { @@ -224,27 +234,21 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) rect.width(), rect.height() }; result = primarySurface->GetSubSurface(primarySurface, &r, &dfbSurface); } - } else { - if (!dfbSurface || oldRect.size() != rect.size()) { - if (dfbSurface) - dfbSurface->Release(dfbSurface); + } else { // mode == Offscreen + if (!dfbSurface) { dfbSurface = screen->createDFBSurface(rect.size(), screen->pixelFormat(), QDirectFBScreen::DontTrackSurface); } const QRegion region = QRegion(oldRect.isEmpty() ? screen->region() : QRegion(oldRect)).subtracted(rect); screen->erase(region); screen->flipSurface(primarySurface, flipFlags, region, QPoint()); } -#endif - if (size() != geometry().size()) { - delete engine; - engine = 0; - } - if (result != DFB_OK) DirectFBErrorFatal("QDirectFBWindowSurface::setGeometry()", result); +#endif } if (oldSurface != dfbSurface) updateFormat(); + QWSWindowSurface::setGeometry(rect); } @@ -417,8 +421,9 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, void QDirectFBWindowSurface::beginPaint(const QRegion &) { - if (!engine) + if (!engine) { engine = new QDirectFBPaintEngine(this); + } } void QDirectFBWindowSurface::endPaint(const QRegion &) -- cgit v0.12 From 9753f87080e1d0f850854bc63f10aca1f3652cce Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Thu, 3 Sep 2009 14:03:26 -0700 Subject: Cache the DFBSurface for the cursor image This surface is painted every time we move the mouse cursor (in NO_DIRECTFB_WM) and doesn't change all that often so caching it is relatively easy and beneficial. Reviewed-by: Donald Carr --- .../gfxdrivers/directfb/qdirectfbscreen.cpp | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 5651506..520bb1a 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -95,6 +95,9 @@ public: IDirectFBImageProvider *imageProvider; #endif QColor backgroundColor; + IDirectFBSurface *cursorSurface; + qint64 cursorImageKey; + QDirectFBScreen *q; }; @@ -117,6 +120,8 @@ QDirectFBScreenPrivate::QDirectFBScreenPrivate(QDirectFBScreen *qptr) #if defined QT_DIRECTFB_IMAGEPROVIDER && defined QT_DIRECTFB_IMAGEPROVIDER_KEEPALIVE , imageProvider(0) #endif + , cursorSurface(0) + , cursorImageKey(0) , q(qptr) { #ifndef QT_NO_QWS_SIGNALHANDLER @@ -1460,13 +1465,17 @@ void QDirectFBScreen::exposeRegion(QRegion r, int changing) const QRect cursorRectangle = cursor->boundingRect(); if (cursor->isVisible() && !cursor->isAccelerated() && cursorRectangle.intersects(brect)) { const QImage image = cursor->image(); - IDirectFBSurface *surface = createDFBSurface(image, image.format(), QDirectFBScreen::DontTrackSurface); - d_ptr->primarySurface->SetBlittingFlags(d_ptr->primarySurface, DSBLIT_BLEND_ALPHACHANNEL); - d_ptr->primarySurface->Blit(d_ptr->primarySurface, surface, 0, cursorRectangle.x(), cursorRectangle.y()); - surface->Release(surface); -#if (Q_DIRECTFB_VERSION >= 0x010000) - d_ptr->primarySurface->ReleaseSource(d_ptr->primarySurface); -#endif + if (image.cacheKey() != d_ptr->cursorImageKey) { + if (d_ptr->cursorSurface) { + releaseDFBSurface(d_ptr->cursorSurface); + } + d_ptr->cursorSurface = createDFBSurface(image, image.format(), QDirectFBScreen::TrackSurface); + d_ptr->cursorImageKey = image.cacheKey(); + } + + Q_ASSERT(d_ptr->cursorSurface); + primary->SetBlittingFlags(primary, DSBLIT_BLEND_ALPHACHANNEL); + primary->Blit(primary, d_ptr->cursorSurface, 0, cursorRectangle.x(), cursorRectangle.y()); } } #endif -- cgit v0.12 From 470ced8337f1ccd448e92fbde48a8e3b1ce39143 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Wed, 2 Sep 2009 20:55:07 -0700 Subject: Make exposeRegion work better in DFB_NO_WM mode Previously we didn't properly compose windows so QT_NO_DIRECTFB_WM mode would generally only work for single windows (with no popups). This also simplifies the code a lot. Previously we would among other things paint the mouse cursor twice in this mode. --- .../gfxdrivers/directfb/qdirectfbscreen.cpp | 173 +++++++++++++-------- .../gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 68 ++------ 2 files changed, 123 insertions(+), 118 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index 520bb1a..211e8a5 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -1391,79 +1391,132 @@ QWSWindowSurface *QDirectFBScreen::createSurface(const QString &key) const return QScreen::createSurface(key); } -// Normally, when using DirectFB to compose the windows (I.e. when -// QT_NO_DIRECTFB_WM isn't set), exposeRegion will simply return. If -// QT_NO_DIRECTFB_WM is set, exposeRegion will compose only non-directFB -// window surfaces. Normal, directFB surfaces are handled by DirectFB. -void QDirectFBScreen::exposeRegion(QRegion r, int changing) +#if defined QT_NO_DIRECTFB_WM +struct PaintCommand { + PaintCommand() : dfbSurface(0), windowOpacity(255), blittingFlags(DSBLIT_NOFX) {} + IDirectFBSurface *dfbSurface; + QImage image; + QPoint windowPosition; + QRegion source; + quint8 windowOpacity; + DFBSurfaceBlittingFlags blittingFlags; +}; + +static inline void initParameters(DFBRectangle &source, const QRect &sourceGlobal, const QPoint &pos) +{ + source.x = sourceGlobal.x() - pos.x(); + source.y = sourceGlobal.y() - pos.y(); + source.w = sourceGlobal.width(); + source.h = sourceGlobal.height(); +} +#endif + +void QDirectFBScreen::exposeRegion(QRegion r, int) { + Q_UNUSED(r); #if defined QT_NO_DIRECTFB_WM - const QList windows = QWSServer::instance()->clientWindows(); - if (changing < 0 || changing >= windows.size()) { - return; - } - QWSWindow *win = windows.at(changing); - QWSWindowSurface *s = win->windowSurface(); r &= region(); if (r.isEmpty()) { return; } + r = r.boundingRect(); - const QRect brect = r.boundingRect(); + IDirectFBSurface *primary = d_ptr->primarySurface; + const QList windows = QWSServer::instance()->clientWindows(); + QVarLengthArray commands(windows.size()); + QRegion region = r; + int idx = 0; + for (int i=0; iwindowSurface(); + if (!surface) + continue; + + const QRect windowGeometry = surface->geometry(); + const QRegion intersection = region & windowGeometry; + if (intersection.isEmpty()) { + continue; + } - if (!s) { - solidFill(d_ptr->backgroundColor, r); - } else { - const QRect windowGeometry = s->geometry(); - const QRegion outsideWindow = r.subtracted(windowGeometry); - if (!outsideWindow.isEmpty()) { - solidFill(d_ptr->backgroundColor, outsideWindow); + PaintCommand &cmd = commands[idx]; + + if (surface->key() == QLatin1String("directfb")) { + const QDirectFBWindowSurface *ws = static_cast(surface); + cmd.dfbSurface = ws->directFBSurface(); + + if (!cmd.dfbSurface) { + continue; + } + } else { + cmd.image = surface->image(); + if (cmd.image.isNull()) { + continue; + } } - const QRegion insideWindow = r.intersected(windowGeometry); - if (!insideWindow.isEmpty()) { - QDirectFBWindowSurface *dfbWindowSurface = (s->key() == QLatin1String("directfb")) - ? static_cast(s) : 0; - if (dfbWindowSurface) { - IDirectFBSurface *surface = dfbWindowSurface->directFBSurface(); - Q_ASSERT(surface); - const int n = insideWindow.numRects(); - if (n == 1 || d_ptr->directFBFlags & BoundingRectFlip) { - const QRect source = (insideWindow.boundingRect().intersected(windowGeometry)).translated(-windowGeometry.topLeft()); - const DFBRectangle rect = { - source.x(), source.y(), source.width(), source.height() - }; - - d_ptr->primarySurface->Blit(d_ptr->primarySurface, surface, &rect, - windowGeometry.x() + source.x(), - windowGeometry.y() + source.y()); - - } else { - const QVector rects = insideWindow.rects(); - QVarLengthArray dfbRectangles(n); - QVarLengthArray dfbPoints(n); - - for (int i=0; iprimarySurface->BatchBlit(d_ptr->primarySurface, surface, dfbRectangles.constData(), - dfbPoints.constData(), n); - } + ++idx; + + cmd.windowPosition = windowGeometry.topLeft(); + cmd.source = intersection; + if (windows.at(i)->isOpaque()) { + region -= intersection; + if (region.isEmpty()) + break; + } else { + cmd.windowOpacity = windows.at(i)->opacity(); + cmd.blittingFlags = cmd.windowOpacity == 255 + ? DSBLIT_BLEND_ALPHACHANNEL + : (DSBLIT_BLEND_ALPHACHANNEL|DSBLIT_BLEND_COLORALPHA); + } + } + if (!region.isEmpty()) { + solidFill(d_ptr->backgroundColor, region); + } + + while (idx > 0) { + const PaintCommand &cmd = commands[--idx]; + Q_ASSERT(cmd.dfbSurface || !cmd.image.isNull()); + IDirectFBSurface *surface; + if (cmd.dfbSurface) { + surface = cmd.dfbSurface; + } else { + Q_ASSERT(!cmd.image.isNull()); + DFBResult result; + surface = createDFBSurface(cmd.image, cmd.image.format(), DontTrackSurface, &result); + Q_ASSERT((result != DFB_OK) == !surface); + if (result != DFB_OK) { + DirectFBError("QDirectFBScreen::exposeRegion: Can't create surface from image", result); + continue; + } + } + + primary->SetBlittingFlags(primary, cmd.blittingFlags); + if (cmd.blittingFlags & DSBLIT_BLEND_COLORALPHA) { + primary->SetColor(primary, 0xff, 0xff, 0xff, cmd.windowOpacity); + } + const QRegion ®ion = cmd.source; + const int rectCount = region.numRects(); + DFBRectangle source; + if (rectCount == 1) { + ::initParameters(source, region.boundingRect(), cmd.windowPosition); + primary->Blit(primary, surface, &source, cmd.windowPosition.x() + source.x, cmd.windowPosition.y() + source.y); + } else { + const QVector rects = region.rects(); + for (int i=0; iBlit(primary, surface, &source, cmd.windowPosition.x() + source.x, cmd.windowPosition.y() + source.y); } } + if (surface != cmd.dfbSurface) { + surface->Release(surface); + } } -#ifdef QT_NO_DIRECTFB_CURSOR + primary->SetColor(primary, 0xff, 0xff, 0xff, 0xff); + +#if defined QT_NO_DIRECTFB_CURSOR and !defined QT_NO_QWS_CURSOR if (QScreenCursor *cursor = QScreenCursor::instance()) { const QRect cursorRectangle = cursor->boundingRect(); - if (cursor->isVisible() && !cursor->isAccelerated() && cursorRectangle.intersects(brect)) { + if (cursor->isVisible() && !cursor->isAccelerated() && r.intersects(cursorRectangle)) { const QImage image = cursor->image(); if (image.cacheKey() != d_ptr->cursorImageKey) { if (d_ptr->cursorSurface) { @@ -1479,10 +1532,8 @@ void QDirectFBScreen::exposeRegion(QRegion r, int changing) } } #endif - flipSurface(d_ptr->primarySurface, d_ptr->flipFlags, r, QPoint()); -#else - Q_UNUSED(r); - Q_UNUSED(changing); + flipSurface(primary, d_ptr->flipFlags, r, QPoint()); + primary->SetBlittingFlags(primary, DSBLIT_NOFX); #endif } diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index 58f7098..61cfec51 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -238,9 +238,6 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) if (!dfbSurface) { dfbSurface = screen->createDFBSurface(rect.size(), screen->pixelFormat(), QDirectFBScreen::DontTrackSurface); } - const QRegion region = QRegion(oldRect.isEmpty() ? screen->region() : QRegion(oldRect)).subtracted(rect); - screen->erase(region); - screen->flipSurface(primarySurface, flipFlags, region, QPoint()); } if (result != DFB_OK) DirectFBErrorFatal("QDirectFBWindowSurface::setGeometry()", result); @@ -250,6 +247,10 @@ void QDirectFBWindowSurface::setGeometry(const QRect &rect) updateFormat(); QWSWindowSurface::setGeometry(rect); +#ifdef QT_NO_DIRECTFB_WM + if (oldRect.isEmpty()) + screen->exposeRegion(screen->region(), 0); +#endif } QByteArray QDirectFBWindowSurface::permanentState() const @@ -350,63 +351,16 @@ void QDirectFBWindowSurface::flush(QWidget *, const QRegion ®ion, const QRect windowGeometry = QDirectFBWindowSurface::geometry(); #ifdef QT_NO_DIRECTFB_WM - IDirectFBSurface *primarySurface = screen->primarySurface(); if (mode == Offscreen) { - primarySurface->SetBlittingFlags(primarySurface, DSBLIT_NOFX); - const QRect windowRect(0, 0, windowGeometry.width(), windowGeometry.height()); - const int n = region.numRects(); - if (n == 1 || boundingRectFlip ) { - const QRect regionBoundingRect = region.boundingRect().translated(offset); - const QRect source = windowRect & regionBoundingRect; - const DFBRectangle rect = { - source.x(), source.y(), source.width(), source.height() - }; - primarySurface->Blit(primarySurface, dfbSurface, &rect, - windowGeometry.x() + source.x(), - windowGeometry.y() + source.y()); - } else { - const QVector rects = region.rects(); - QVarLengthArray dfbRectangles(n); - QVarLengthArray dfbPoints(n); - - for (int i=0; iBatchBlit(primarySurface, dfbSurface, dfbRectangles.constData(), - dfbPoints.constData(), n); - } - } - -#ifdef QT_NO_DIRECTFB_CURSOR - if (QScreenCursor *cursor = QScreenCursor::instance()) { - const QRect cursorRectangle = cursor->boundingRect(); - if (cursor->isVisible() && !cursor->isAccelerated() - && region.intersects(cursorRectangle.translated(-(offset + windowGeometry.topLeft())))) { - const QImage image = cursor->image(); - - IDirectFBSurface *surface = screen->createDFBSurface(image, image.format(), QDirectFBScreen::DontTrackSurface); - primarySurface->SetBlittingFlags(primarySurface, DSBLIT_BLEND_ALPHACHANNEL); - primarySurface->Blit(primarySurface, surface, 0, cursorRectangle.x(), cursorRectangle.y()); - surface->Release(surface); -#if (Q_DIRECTFB_VERSION >= 0x010000) - primarySurface->ReleaseSource(primarySurface); -#endif - } + QRegion r = region; + r.translate(offset + windowGeometry.topLeft()); + screen->exposeRegion(r, 0); + } else { + screen->flipSurface(dfbSurface, flipFlags, region, offset); } -#endif - if (mode == Offscreen) { - screen->flipSurface(primarySurface, flipFlags, region, offset + windowGeometry.topLeft()); - } else -#endif +#else screen->flipSurface(dfbSurface, flipFlags, region, offset); +#endif #ifdef QT_DIRECTFB_TIMING enum { Secs = 3 }; -- cgit v0.12 From 93819237a17fbd17fc4161e7f44567b272bbb14b Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 4 Sep 2009 14:30:33 +1000 Subject: Pedantic fixes for license headers. Reviewed-by: Trust Me --- src/gui/dialogs/qfiledialog_wince.ui | 1 + tools/linguist/lrelease/lrelease.1 | 4 ++-- tools/porting/src/ast.cpp | 2 +- tools/porting/src/ast.h | 2 +- tools/porting/src/codemodel.cpp | 2 +- tools/porting/src/codemodel.h | 2 +- tools/porting/src/cpplexer.cpp | 2 +- tools/porting/src/cpplexer.h | 2 +- tools/porting/src/errors.cpp | 2 +- tools/porting/src/errors.h | 2 +- tools/porting/src/parser.cpp | 2 +- tools/porting/src/parser.h | 2 +- tools/porting/src/rpp.cpp | 2 +- tools/porting/src/rpp.h | 2 +- tools/porting/src/rpplexer.cpp | 2 +- tools/porting/src/rpplexer.h | 2 +- tools/porting/src/rpptreeevaluator.cpp | 2 +- tools/porting/src/semantic.cpp | 2 +- tools/porting/src/semantic.h | 2 +- tools/porting/src/smallobject.cpp | 2 +- tools/porting/src/smallobject.h | 2 +- tools/porting/src/tokenizer.cpp | 2 +- tools/porting/src/tokenizer.h | 2 +- tools/porting/src/tokens.h | 2 +- tools/porting/src/tokenstreamadapter.h | 2 +- tools/porting/src/treewalker.cpp | 2 +- tools/porting/src/treewalker.h | 2 +- util/scripts/make_qfeatures_dot_h | 41 ++++++++++++++++++++++++++++++++++ 28 files changed, 69 insertions(+), 27 deletions(-) diff --git a/src/gui/dialogs/qfiledialog_wince.ui b/src/gui/dialogs/qfiledialog_wince.ui index 1bd189e..f134f64 100644 --- a/src/gui/dialogs/qfiledialog_wince.ui +++ b/src/gui/dialogs/qfiledialog_wince.ui @@ -2,6 +2,7 @@ ********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the QtGui module of the Qt Toolkit. ** diff --git a/tools/linguist/lrelease/lrelease.1 b/tools/linguist/lrelease/lrelease.1 index c170e2a..b591957 100644 --- a/tools/linguist/lrelease/lrelease.1 +++ b/tools/linguist/lrelease/lrelease.1 @@ -2,9 +2,9 @@ .\" .\" Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). .\" Contact: Nokia Corporation (qt-info@nokia.com) -.\" +.\" .\" This file is part of the QtGui module of the Qt Toolkit. -.\" +.\" .\" $QT_BEGIN_LICENSE:LGPL$ .\" No Commercial Usage .\" This file contains pre-release code and may not be distributed. diff --git a/tools/porting/src/ast.cpp b/tools/porting/src/ast.cpp index 118d52c..4a36e35 100644 --- a/tools/porting/src/ast.cpp +++ b/tools/porting/src/ast.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/ast.h b/tools/porting/src/ast.h index e71d2e0..85d7070 100644 --- a/tools/porting/src/ast.h +++ b/tools/porting/src/ast.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/codemodel.cpp b/tools/porting/src/codemodel.cpp index b9b82aa..be0682b 100644 --- a/tools/porting/src/codemodel.cpp +++ b/tools/porting/src/codemodel.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/codemodel.h b/tools/porting/src/codemodel.h index 62cb314..4807972 100644 --- a/tools/porting/src/codemodel.h +++ b/tools/porting/src/codemodel.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/cpplexer.cpp b/tools/porting/src/cpplexer.cpp index 4be00f6..79dcd9a 100644 --- a/tools/porting/src/cpplexer.cpp +++ b/tools/porting/src/cpplexer.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/cpplexer.h b/tools/porting/src/cpplexer.h index ed01b69..5c756c4 100644 --- a/tools/porting/src/cpplexer.h +++ b/tools/porting/src/cpplexer.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/errors.cpp b/tools/porting/src/errors.cpp index b8a3d8c..abd58e3 100644 --- a/tools/porting/src/errors.cpp +++ b/tools/porting/src/errors.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/errors.h b/tools/porting/src/errors.h index 46eeab7..e34e04d 100644 --- a/tools/porting/src/errors.h +++ b/tools/porting/src/errors.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/parser.cpp b/tools/porting/src/parser.cpp index 50325f8..83f0c4b 100644 --- a/tools/porting/src/parser.cpp +++ b/tools/porting/src/parser.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/parser.h b/tools/porting/src/parser.h index 1397886..330c9f5 100644 --- a/tools/porting/src/parser.h +++ b/tools/porting/src/parser.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpp.cpp b/tools/porting/src/rpp.cpp index 787ce2a..b6ec429 100644 --- a/tools/porting/src/rpp.cpp +++ b/tools/porting/src/rpp.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpp.h b/tools/porting/src/rpp.h index 2c10b51..863e2fc 100644 --- a/tools/porting/src/rpp.h +++ b/tools/porting/src/rpp.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpplexer.cpp b/tools/porting/src/rpplexer.cpp index e92ec9b..bbea068 100644 --- a/tools/porting/src/rpplexer.cpp +++ b/tools/porting/src/rpplexer.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpplexer.h b/tools/porting/src/rpplexer.h index 273df0c..e661fa0 100644 --- a/tools/porting/src/rpplexer.h +++ b/tools/porting/src/rpplexer.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/rpptreeevaluator.cpp b/tools/porting/src/rpptreeevaluator.cpp index 9d6e3db..d696f75 100644 --- a/tools/porting/src/rpptreeevaluator.cpp +++ b/tools/porting/src/rpptreeevaluator.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/semantic.cpp b/tools/porting/src/semantic.cpp index 296e614..efe2bc4 100644 --- a/tools/porting/src/semantic.cpp +++ b/tools/porting/src/semantic.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/semantic.h b/tools/porting/src/semantic.h index 8e16f2e..548faf6 100644 --- a/tools/porting/src/semantic.h +++ b/tools/porting/src/semantic.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/smallobject.cpp b/tools/porting/src/smallobject.cpp index eac82ef..c3b221f 100644 --- a/tools/porting/src/smallobject.cpp +++ b/tools/porting/src/smallobject.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/smallobject.h b/tools/porting/src/smallobject.h index adc4ae7..8b9f91f 100644 --- a/tools/porting/src/smallobject.h +++ b/tools/porting/src/smallobject.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokenizer.cpp b/tools/porting/src/tokenizer.cpp index 4cdf584..e971602 100644 --- a/tools/porting/src/tokenizer.cpp +++ b/tools/porting/src/tokenizer.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokenizer.h b/tools/porting/src/tokenizer.h index d98315a..1762c78 100644 --- a/tools/porting/src/tokenizer.h +++ b/tools/porting/src/tokenizer.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokens.h b/tools/porting/src/tokens.h index 960f1ce..02eab54 100644 --- a/tools/porting/src/tokens.h +++ b/tools/porting/src/tokens.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/tokenstreamadapter.h b/tools/porting/src/tokenstreamadapter.h index 110f814b..948db5a 100644 --- a/tools/porting/src/tokenstreamadapter.h +++ b/tools/porting/src/tokenstreamadapter.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/treewalker.cpp b/tools/porting/src/treewalker.cpp index 1593674..2d3d53c 100644 --- a/tools/porting/src/treewalker.cpp +++ b/tools/porting/src/treewalker.cpp @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/tools/porting/src/treewalker.h b/tools/porting/src/treewalker.h index 3f75d7c..168d7b4 100644 --- a/tools/porting/src/treewalker.h +++ b/tools/porting/src/treewalker.h @@ -1,8 +1,8 @@ /**************************************************************************** ** +** Copyright (C) 2001-2004 Roberto Raggi ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) -** Copyright (C) 2001-2004 Roberto Raggi ** ** This file is part of the qt3to4 porting application of the Qt Toolkit. ** diff --git a/util/scripts/make_qfeatures_dot_h b/util/scripts/make_qfeatures_dot_h index d925d15..b3ce739 100755 --- a/util/scripts/make_qfeatures_dot_h +++ b/util/scripts/make_qfeatures_dot_h @@ -1,4 +1,45 @@ #!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + # # Usage: make_qfeatures_dot_h # -- cgit v0.12 From 2e0d78836becf24c7f27c982316cf1b4492f27aa Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 4 Sep 2009 14:32:05 +1000 Subject: Remove license header as Solaris X86 assembler can't digest comments. Reviewed-by: Trust Me --- src/corelib/arch/i386/qatomic_i386.s | 40 ------------------------------------ 1 file changed, 40 deletions(-) diff --git a/src/corelib/arch/i386/qatomic_i386.s b/src/corelib/arch/i386/qatomic_i386.s index 63facc1..08158f9 100644 --- a/src/corelib/arch/i386/qatomic_i386.s +++ b/src/corelib/arch/i386/qatomic_i386.s @@ -1,43 +1,3 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! -!! Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -!! Contact: Nokia Corporation (qt-info@nokia.com) -!! -!! This file is part of the QtGui module of the Qt Toolkit. -!! -!! $QT_BEGIN_LICENSE:LGPL$ -!! No Commercial Usage -!! This file contains pre-release code and may not be distributed. -!! You may use this file in accordance with the terms and conditions -!! contained in the Technology Preview License Agreement accompanying -!! this package. -!! -!! GNU Lesser General Public License Usage -!! Alternatively, this file may be used under the terms of the GNU Lesser -!! General Public License version 2.1 as published by the Free Software -!! Foundation and appearing in the file LICENSE.LGPL included in the -!! packaging of this file. Please review the following information to -!! ensure the GNU Lesser General Public License version 2.1 requirements -!! will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -!! -!! In addition, as a special exception, Nokia gives you certain -!! additional rights. These rights are described in the Nokia Qt LGPL -!! Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -!! package. -!! -!! If you have questions regarding the use of this file, please contact -!! Nokia at qt-info@nokia.com. -!! -!! -!! -!! -!! -!! -!! -!! -!! $QT_END_LICENSE$ -!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .text .align 4,0x90 -- cgit v0.12 From 0e8e79623faf7228119af75965f5726a01d1141d Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 4 Sep 2009 14:38:38 +1000 Subject: Fix compilation on OS X. Reviewed-by: Aaron Kennedy --- src/gui/painting/qoutlinemapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index 216b8c6..8d04a84 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include "qoutlinemapper_p.h" - +#include #include "qmath.h" #include -- cgit v0.12 From eb8e64a43b59c4c299028049b57c4cdf6dee5efd Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 4 Sep 2009 15:58:13 +1000 Subject: Add license headers to python code Reviewed-by: Trust Me --- .../diagrams/contentspropagation/customwidget.py | 40 +++++++++++++++++++++ .../contentspropagation/standardwidgets.py | 40 +++++++++++++++++++++ doc/src/diagrams/programs/mdiarea.py | 40 +++++++++++++++++++++ doc/src/diagrams/programs/qpen-dashpattern.py | 40 +++++++++++++++++++++ tools/activeqt/testcon/scripts/pythonscript.py | 42 ++++++++++++++++++++++ util/local_database/cldr2qlocalexml.py | 42 +++++++++++++++++++++- util/local_database/enumdata.py | 42 ++++++++++++++++++++++ util/local_database/qlocalexml2cpp.py | 42 +++++++++++++++++++++- util/local_database/xpathlite.py | 42 ++++++++++++++++++++++ 9 files changed, 368 insertions(+), 2 deletions(-) diff --git a/doc/src/diagrams/contentspropagation/customwidget.py b/doc/src/diagrams/contentspropagation/customwidget.py index 89e0b1b..68d64e5 100755 --- a/doc/src/diagrams/contentspropagation/customwidget.py +++ b/doc/src/diagrams/contentspropagation/customwidget.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import os, sys from PyQt4.QtCore import * diff --git a/doc/src/diagrams/contentspropagation/standardwidgets.py b/doc/src/diagrams/contentspropagation/standardwidgets.py index 975287d..fb5796e 100755 --- a/doc/src/diagrams/contentspropagation/standardwidgets.py +++ b/doc/src/diagrams/contentspropagation/standardwidgets.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import os, sys from PyQt4.QtCore import * diff --git a/doc/src/diagrams/programs/mdiarea.py b/doc/src/diagrams/programs/mdiarea.py index c78659f..c336382 100644 --- a/doc/src/diagrams/programs/mdiarea.py +++ b/doc/src/diagrams/programs/mdiarea.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import sys from PyQt4.QtCore import SIGNAL diff --git a/doc/src/diagrams/programs/qpen-dashpattern.py b/doc/src/diagrams/programs/qpen-dashpattern.py index 095d51f..24a793e 100644 --- a/doc/src/diagrams/programs/qpen-dashpattern.py +++ b/doc/src/diagrams/programs/qpen-dashpattern.py @@ -1,4 +1,44 @@ #!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import sys from PyQt4.QtCore import * diff --git a/tools/activeqt/testcon/scripts/pythonscript.py b/tools/activeqt/testcon/scripts/pythonscript.py index 79bca87..d9cc67c 100644 --- a/tools/activeqt/testcon/scripts/pythonscript.py +++ b/tools/activeqt/testcon/scripts/pythonscript.py @@ -1,3 +1,45 @@ +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + def QAxWidget2_Click(): QAxWidget2.lineWidth = QAxWidget2.lineWidth + 1; MainWindow.logMacro(0, "Hello from Python: QAxWidget2_Click", 0, ""); diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py index e4446c4..1c3debb 100755 --- a/util/local_database/cldr2qlocalexml.py +++ b/util/local_database/cldr2qlocalexml.py @@ -1,4 +1,44 @@ -#! /usr/bin/python +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import os import sys diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py index b0ab848..5c65ff3 100644 --- a/util/local_database/enumdata.py +++ b/util/local_database/enumdata.py @@ -1,3 +1,45 @@ +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + # langugae_list and country_list reflect the current values of enums in qlocale.h # If new xml language files are available in CLDR, these languages and countries # need to be *appended* to this list. diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py index a9abe22..a166313 100755 --- a/util/local_database/qlocalexml2cpp.py +++ b/util/local_database/qlocalexml2cpp.py @@ -1,4 +1,44 @@ -#! /usr/bin/python +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# import sys import xml.dom.minidom diff --git a/util/local_database/xpathlite.py b/util/local_database/xpathlite.py index 6e4dd71..9cfd335 100644 --- a/util/local_database/xpathlite.py +++ b/util/local_database/xpathlite.py @@ -1,3 +1,45 @@ +#!/usr/bin/env python +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + import sys import os import xml.dom.minidom -- cgit v0.12 From 161baea80667846f3d5e9c240bf6080d489209d3 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 4 Sep 2009 16:38:54 +1000 Subject: Add license headers to .l files. Reviewed-by: Trust Me --- util/qlalr/examples/glsl/glsl-lex.l | 41 +++++++++++++++++++++++++++++++++++++ util/qlalr/examples/qparser/calc.l | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/util/qlalr/examples/glsl/glsl-lex.l b/util/qlalr/examples/glsl/glsl-lex.l index 1e07c3b..8e3334a 100644 --- a/util/qlalr/examples/glsl/glsl-lex.l +++ b/util/qlalr/examples/glsl/glsl-lex.l @@ -1,5 +1,46 @@ %{ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QLALR tool of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include #define YY_DECL int GLSLParser::nextToken() %} diff --git a/util/qlalr/examples/qparser/calc.l b/util/qlalr/examples/qparser/calc.l index 95181d5..eed04ab 100644 --- a/util/qlalr/examples/qparser/calc.l +++ b/util/qlalr/examples/qparser/calc.l @@ -2,6 +2,47 @@ %option noyywrap %{ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QLALR tool of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "calc_parser.h" #include -- cgit v0.12 From 974aec137dfdbb1dd68c41113b22eb25131965b8 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Fri, 4 Sep 2009 14:12:08 +1000 Subject: Modify QMatrix4x4 and QQuaternion to use qreal internally Some concerns were expressed about the float precision of QMatrix4x4, which this change addresses by using qreal instead. The QVector2D/3D/4D classes still use float internally, so that they can be used directly in large arrays of vertex values to be uploaded to an OpenGL server. QQuaternion is a client-side class, and it should produce rotations that are consistent with QMatrix4x4. So its precision was changed too. A consequence of this change is that the following no longer works in a portable fashion: QMatrix4x4 mat; ... glLoadMatrixf(mat.constData()); The caller must now repack the argument to convert from qreal to GLfloat. Reviewed-by: Michael Goddard Reviewed-by: Andreas --- demos/boxes/scene.cpp | 28 ++- src/gui/math3d/qgenericmatrix.cpp | 53 ++--- src/gui/math3d/qgenericmatrix.h | 209 +++++++++-------- src/gui/math3d/qmatrix4x4.cpp | 298 ++++++++++++------------- src/gui/math3d/qmatrix4x4.h | 232 +++++++++---------- src/gui/math3d/qquaternion.cpp | 17 +- src/gui/math3d/qquaternion.h | 60 +++-- src/gui/math3d/qvector3d.h | 3 - src/gui/math3d/qvector4d.h | 3 - src/opengl/qglshaderprogram.cpp | 197 ++++++++-------- tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp | 125 +++++------ tests/auto/qquaternion/tst_qquaternion.cpp | 29 ++- tests/auto/qvectornd/tst_qvectornd.cpp | 55 +++-- tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp | 12 +- 14 files changed, 630 insertions(+), 691 deletions(-) diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp index 2a7ca0e..7c0d4d8 100644 --- a/demos/boxes/scene.cpp +++ b/demos/boxes/scene.cpp @@ -649,6 +649,24 @@ void Scene::initGL() m_renderOptions->emitParameterChanged(); } +static void loadMatrix(const QMatrix4x4& m) +{ + GLfloat mat[16]; + const qreal *data = m.constData(); + for (int index = 0; index < 16; ++index) + mat[index] = data[index]; + glLoadMatrixf(mat); +} + +static void multMatrix(const QMatrix4x4& m) +{ + GLfloat mat[16]; + const qreal *data = m.constData(); + for (int index = 0; index < 16; ++index) + mat[index] = data[index]; + glMultMatrixf(mat); +} + // If one of the boxes should not be rendered, set excludeBox to its index. // If the main box should not be rendered, set excludeBox to -1. void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) @@ -673,7 +691,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) viewRotation(3, 0) = viewRotation(3, 1) = viewRotation(3, 2) = 0.0f; viewRotation(0, 3) = viewRotation(1, 3) = viewRotation(2, 3) = 0.0f; viewRotation(3, 3) = 1.0f; - glLoadMatrixf(viewRotation.data()); + loadMatrix(viewRotation); glScalef(20.0f, 20.0f, 20.0f); // Don't render the environment if the environment texture can't be set for the correct sampler. @@ -688,7 +706,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) m_environment->unbind(); } - glLoadMatrixf(view.data()); + loadMatrix(view); glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); @@ -702,7 +720,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) m.rotate(m_trackBalls[1].rotation()); m = m.transposed(); - glMultMatrixf(m.data()); + multMatrix(m); glRotatef(360.0f * i / m_programs.size(), 0.0f, 0.0f, 1.0f); glTranslatef(2.0f, 0.0f, 0.0f); @@ -736,7 +754,7 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox) QMatrix4x4 m; m.rotate(m_trackBalls[0].rotation()); m = m.transposed(); - glMultMatrixf(m.data()); + multMatrix(m); if (glActiveTexture) { if (m_dynamicCubemap) @@ -842,7 +860,7 @@ void Scene::renderCubemaps() glMatrixMode(GL_PROJECTION); glPushMatrix(); - glLoadMatrixf(mat.data()); + loadMatrix(mat); glMatrixMode(GL_MODELVIEW); glPushMatrix(); diff --git a/src/gui/math3d/qgenericmatrix.cpp b/src/gui/math3d/qgenericmatrix.cpp index 290c9c2..b5d8824 100644 --- a/src/gui/math3d/qgenericmatrix.cpp +++ b/src/gui/math3d/qgenericmatrix.cpp @@ -50,19 +50,14 @@ QT_BEGIN_NAMESPACE \ingroup painting \ingroup painting-3D - The QGenericMatrix template has four parameters: + The QGenericMatrix template has three parameters: \table \row \i N \i Number of columns. \row \i M \i Number of rows. \row \i T \i Element type that is visible to users of the class. - \row \i InnerT \i Element type that is used inside the class. \endtable - Normally T and InnerT are the same type; e.g. float or double. - But they can be different if the user wants to store elements - internally in a fixed-point format for the underlying hardware. - \sa QMatrix4x4 */ @@ -73,7 +68,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix::QGenericMatrix(const QGenericMatrix& other) + \fn QGenericMatrix::QGenericMatrix(const QGenericMatrix& other) Constructs a copy of \a other. */ @@ -89,13 +84,14 @@ QT_BEGIN_NAMESPACE */ /*! - \fn T QGenericMatrix::operator()(int row, int column) const + \fn const T& QGenericMatrix::operator()(int row, int column) const - Returns the element at position (\a row, \a column) in this matrix. + Returns a constant reference to the element at position + (\a row, \a column) in this matrix. */ /*! - \fn InnerT& QGenericMatrix::operator()(int row, int column) + \fn T& QGenericMatrix::operator()(int row, int column) Returns a reference to the element at position (\a row, \a column) in this matrix so that the element can be assigned to. @@ -130,57 +126,57 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix& QGenericMatrix::operator+=(const QGenericMatrix& other) + \fn QGenericMatrix& QGenericMatrix::operator+=(const QGenericMatrix& other) Adds the contents of \a other to this matrix. */ /*! - \fn QGenericMatrix& QGenericMatrix::operator-=(const QGenericMatrix& other) + \fn QGenericMatrix& QGenericMatrix::operator-=(const QGenericMatrix& other) Subtracts the contents of \a other from this matrix. */ /*! - \fn QGenericMatrix& QGenericMatrix::operator*=(T factor) + \fn QGenericMatrix& QGenericMatrix::operator*=(T factor) Multiplies all elements of this matrix by \a factor. */ /*! - \fn QGenericMatrix& QGenericMatrix::operator/=(T divisor) + \fn QGenericMatrix& QGenericMatrix::operator/=(T divisor) Divides all elements of this matrix by \a divisor. */ /*! - \fn bool QGenericMatrix::operator==(const QGenericMatrix& other) const + \fn bool QGenericMatrix::operator==(const QGenericMatrix& other) const Returns true if this matrix is identical to \a other; false otherwise. */ /*! - \fn bool QGenericMatrix::operator!=(const QGenericMatrix& other) const + \fn bool QGenericMatrix::operator!=(const QGenericMatrix& other) const Returns true if this matrix is not identical to \a other; false otherwise. */ /*! - \fn QGenericMatrix operator+(const QGenericMatrix& m1, const QGenericMatrix& m2) + \fn QGenericMatrix operator+(const QGenericMatrix& m1, const QGenericMatrix& m2) \relates QGenericMatrix Returns the sum of \a m1 and \a m2. */ /*! - \fn QGenericMatrix operator-(const QGenericMatrix& m1, const QGenericMatrix& m2) + \fn QGenericMatrix operator-(const QGenericMatrix& m1, const QGenericMatrix& m2) \relates QGenericMatrix Returns the difference of \a m1 and \a m2. */ /*! - \fn QGenericMatrix operator*(const QGenericMatrix& m1, const QGenericMatrix& m2) + \fn QGenericMatrix operator*(const QGenericMatrix& m1, const QGenericMatrix& m2) \relates QGenericMatrix Returns the product of the NxM2 matrix \a m1 and the M1xN matrix \a m2 @@ -188,7 +184,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix operator-(const QGenericMatrix& matrix) + \fn QGenericMatrix operator-(const QGenericMatrix& matrix) \overload \relates QGenericMatrix @@ -196,21 +192,21 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QGenericMatrix operator*(T factor, const QGenericMatrix& matrix) + \fn QGenericMatrix operator*(T factor, const QGenericMatrix& matrix) \relates QGenericMatrix Returns the result of multiplying all elements of \a matrix by \a factor. */ /*! - \fn QGenericMatrix operator*(const QGenericMatrix& matrix, T factor) + \fn QGenericMatrix operator*(const QGenericMatrix& matrix, T factor) \relates QGenericMatrix Returns the result of multiplying all elements of \a matrix by \a factor. */ /*! - \fn QGenericMatrix operator/(const QGenericMatrix& matrix, T divisor) + \fn QGenericMatrix operator/(const QGenericMatrix& matrix, T divisor) \relates QGenericMatrix Returns the result of dividing all elements of \a matrix by \a divisor. @@ -224,28 +220,25 @@ QT_BEGIN_NAMESPACE */ /*! - \fn InnerT *QGenericMatrix::data() + \fn T *QGenericMatrix::data() - Returns a pointer to the raw data of this matrix. This is intended - for use with raw GL functions. + Returns a pointer to the raw data of this matrix. \sa constData() */ /*! - \fn const InnerT *QGenericMatrix::data() const + \fn const T *QGenericMatrix::data() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa constData() */ /*! - \fn const InnerT *QGenericMatrix::constData() const + \fn const T *QGenericMatrix::constData() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa data() */ diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h index fe7ba5f..39c4ed8 100644 --- a/src/gui/math3d/qgenericmatrix.h +++ b/src/gui/math3d/qgenericmatrix.h @@ -51,103 +51,103 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) -template +template class QGenericMatrix { public: QGenericMatrix(); - QGenericMatrix(const QGenericMatrix& other); + QGenericMatrix(const QGenericMatrix& other); explicit QGenericMatrix(const T *values); - T operator()(int row, int column) const; - InnerT& operator()(int row, int column); + const T& operator()(int row, int column) const; + T& operator()(int row, int column); bool isIdentity() const; void setIdentity(); void fill(T value); - QGenericMatrix transposed() const; + QGenericMatrix transposed() const; - QGenericMatrix& operator+=(const QGenericMatrix& other); - QGenericMatrix& operator-=(const QGenericMatrix& other); - QGenericMatrix& operator*=(T factor); - QGenericMatrix& operator/=(T divisor); - bool operator==(const QGenericMatrix& other) const; - bool operator!=(const QGenericMatrix& other) const; + QGenericMatrix& operator+=(const QGenericMatrix& other); + QGenericMatrix& operator-=(const QGenericMatrix& other); + QGenericMatrix& operator*=(T factor); + QGenericMatrix& operator/=(T divisor); + bool operator==(const QGenericMatrix& other) const; + bool operator!=(const QGenericMatrix& other) const; void toValueArray(T *values); - InnerT *data() { return m[0]; } - const InnerT *data() const { return m[0]; } - const InnerT *constData() const { return m[0]; } + T *data() { return m[0]; } + const T *data() const { return m[0]; } + const T *constData() const { return m[0]; } #if !defined(Q_NO_TEMPLATE_FRIENDS) - template - friend QGenericMatrix operator+(const QGenericMatrix& m1, const QGenericMatrix& m2); - template - friend QGenericMatrix operator-(const QGenericMatrix& m1, const QGenericMatrix& m2); - template - friend QGenericMatrix operator*(const QGenericMatrix& m1, const QGenericMatrix& m2); - template - friend QGenericMatrix operator-(const QGenericMatrix& matrix); - template - friend QGenericMatrix operator*(TT factor, const QGenericMatrix& matrix); - template - friend QGenericMatrix operator*(const QGenericMatrix& matrix, TT factor); - template - friend QGenericMatrix operator/(const QGenericMatrix& matrix, TT divisor); + template + friend QGenericMatrix operator+(const QGenericMatrix& m1, const QGenericMatrix& m2); + template + friend QGenericMatrix operator-(const QGenericMatrix& m1, const QGenericMatrix& m2); + template + friend QGenericMatrix operator*(const QGenericMatrix& m1, const QGenericMatrix& m2); + template + friend QGenericMatrix operator-(const QGenericMatrix& matrix); + template + friend QGenericMatrix operator*(TT factor, const QGenericMatrix& matrix); + template + friend QGenericMatrix operator*(const QGenericMatrix& matrix, TT factor); + template + friend QGenericMatrix operator/(const QGenericMatrix& matrix, TT divisor); private: #endif - InnerT m[N][M]; // Column-major order to match OpenGL. + T m[N][M]; // Column-major order to match OpenGL. QGenericMatrix(int) {} // Construct without initializing identity matrix. #if !defined(Q_NO_TEMPLATE_FRIENDS) - template + template friend class QGenericMatrix; #endif }; -template -Q_INLINE_TEMPLATE QGenericMatrix::QGenericMatrix() +template +Q_INLINE_TEMPLATE QGenericMatrix::QGenericMatrix() { setIdentity(); } -template -Q_INLINE_TEMPLATE QGenericMatrix::QGenericMatrix(const QGenericMatrix& other) +template +Q_INLINE_TEMPLATE QGenericMatrix::QGenericMatrix(const QGenericMatrix& other) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) m[col][row] = other.m[col][row]; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix::QGenericMatrix(const T *values) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix::QGenericMatrix(const T *values) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) m[col][row] = values[row * N + col]; } -template -Q_INLINE_TEMPLATE T QGenericMatrix::operator()(int row, int column) const +template +Q_INLINE_TEMPLATE const T& QGenericMatrix::operator()(int row, int column) const { Q_ASSERT(row >= 0 && row < M && column >= 0 && column < N); - return T(m[column][row]); + return m[column][row]; } -template -Q_INLINE_TEMPLATE InnerT& QGenericMatrix::operator()(int row, int column) +template +Q_INLINE_TEMPLATE T& QGenericMatrix::operator()(int row, int column) { Q_ASSERT(row >= 0 && row < M && column >= 0 && column < N); return m[column][row]; } -template -Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::isIdentity() const +template +Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::isIdentity() const { for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { @@ -163,8 +163,8 @@ Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::isIdentity() const return true; } -template -Q_OUTOFLINE_TEMPLATE void QGenericMatrix::setIdentity() +template +Q_OUTOFLINE_TEMPLATE void QGenericMatrix::setIdentity() { for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { @@ -176,51 +176,50 @@ Q_OUTOFLINE_TEMPLATE void QGenericMatrix::setIdentity() } } -template -Q_OUTOFLINE_TEMPLATE void QGenericMatrix::fill(T value) +template +Q_OUTOFLINE_TEMPLATE void QGenericMatrix::fill(T value) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) m[col][row] = value; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix QGenericMatrix::transposed() const +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix QGenericMatrix::transposed() const { - QGenericMatrix result(1); + QGenericMatrix result(1); for (int row = 0; row < M; ++row) for (int col = 0; col < N; ++col) result.m[row][col] = m[col][row]; return result; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator+=(const QGenericMatrix& other) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator+=(const QGenericMatrix& other) { for (int index = 0; index < N * M; ++index) m[0][index] += other.m[0][index]; return *this; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator-=(const QGenericMatrix& other) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator-=(const QGenericMatrix& other) { for (int index = 0; index < N * M; ++index) m[0][index] -= other.m[0][index]; return *this; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator*=(T factor) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator*=(T factor) { - InnerT f(factor); for (int index = 0; index < N * M; ++index) - m[0][index] *= f; + m[0][index] *= factor; return *this; } -template -Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator==(const QGenericMatrix& other) const +template +Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator==(const QGenericMatrix& other) const { for (int index = 0; index < N * M; ++index) { if (m[0][index] != other.m[0][index]) @@ -229,8 +228,8 @@ Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator==(const QGen return true; } -template -Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator!=(const QGenericMatrix& other) const +template +Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator!=(const QGenericMatrix& other) const { for (int index = 0; index < N * M; ++index) { if (m[0][index] != other.m[0][index]) @@ -239,40 +238,39 @@ Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator!=(const QGen return false; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator/=(T divisor) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator/=(T divisor) { - InnerT d(divisor); for (int index = 0; index < N * M; ++index) - m[0][index] /= d; + m[0][index] /= divisor; return *this; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix operator+(const QGenericMatrix& m1, const QGenericMatrix& m2) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix operator+(const QGenericMatrix& m1, const QGenericMatrix& m2) { - QGenericMatrix result(1); + QGenericMatrix result(1); for (int index = 0; index < N * M; ++index) result.m[0][index] = m1.m[0][index] + m2.m[0][index]; return result; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix operator-(const QGenericMatrix& m1, const QGenericMatrix& m2) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix operator-(const QGenericMatrix& m1, const QGenericMatrix& m2) { - QGenericMatrix result(1); + QGenericMatrix result(1); for (int index = 0; index < N * M; ++index) result.m[0][index] = m1.m[0][index] - m2.m[0][index]; return result; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(const QGenericMatrix& m1, const QGenericMatrix& m2) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(const QGenericMatrix& m1, const QGenericMatrix& m2) { - QGenericMatrix result(1); + QGenericMatrix result(1); for (int row = 0; row < M2; ++row) { for (int col = 0; col < M1; ++col) { - InnerT sum(0.0f); + T sum(0.0f); for (int j = 0; j < N; ++j) sum += m1.m[j][row] * m2.m[col][j]; result.m[col][row] = sum; @@ -281,47 +279,44 @@ Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(const QGenericM return result; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix operator-(const QGenericMatrix& matrix) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix operator-(const QGenericMatrix& matrix) { - QGenericMatrix result(1); + QGenericMatrix result(1); for (int index = 0; index < N * M; ++index) result.m[0][index] = -matrix.m[0][index]; return result; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(T factor, const QGenericMatrix& matrix) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(T factor, const QGenericMatrix& matrix) { - InnerT f(factor); - QGenericMatrix result(1); + QGenericMatrix result(1); for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] * f; + result.m[0][index] = matrix.m[0][index] * factor; return result; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(const QGenericMatrix& matrix, T factor) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(const QGenericMatrix& matrix, T factor) { - InnerT f(factor); - QGenericMatrix result(1); + QGenericMatrix result(1); for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] * f; + result.m[0][index] = matrix.m[0][index] * factor; return result; } -template -Q_OUTOFLINE_TEMPLATE QGenericMatrix operator/(const QGenericMatrix& matrix, T divisor) +template +Q_OUTOFLINE_TEMPLATE QGenericMatrix operator/(const QGenericMatrix& matrix, T divisor) { - InnerT d(divisor); - QGenericMatrix result(1); + QGenericMatrix result(1); for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] / d; + result.m[0][index] = matrix.m[0][index] / divisor; return result; } -template -Q_OUTOFLINE_TEMPLATE void QGenericMatrix::toValueArray(T *values) +template +Q_OUTOFLINE_TEMPLATE void QGenericMatrix::toValueArray(T *values) { for (int col = 0; col < N; ++col) for (int row = 0; row < M; ++row) @@ -329,22 +324,22 @@ Q_OUTOFLINE_TEMPLATE void QGenericMatrix::toValueArray(T *value } // Define aliases for the useful variants of QGenericMatrix. -typedef QGenericMatrix<2, 2, qreal, float> QMatrix2x2; -typedef QGenericMatrix<2, 3, qreal, float> QMatrix2x3; -typedef QGenericMatrix<2, 4, qreal, float> QMatrix2x4; -typedef QGenericMatrix<3, 2, qreal, float> QMatrix3x2; -typedef QGenericMatrix<3, 3, qreal, float> QMatrix3x3; -typedef QGenericMatrix<3, 4, qreal, float> QMatrix3x4; -typedef QGenericMatrix<4, 2, qreal, float> QMatrix4x2; -typedef QGenericMatrix<4, 3, qreal, float> QMatrix4x3; +typedef QGenericMatrix<2, 2, qreal> QMatrix2x2; +typedef QGenericMatrix<2, 3, qreal> QMatrix2x3; +typedef QGenericMatrix<2, 4, qreal> QMatrix2x4; +typedef QGenericMatrix<3, 2, qreal> QMatrix3x2; +typedef QGenericMatrix<3, 3, qreal> QMatrix3x3; +typedef QGenericMatrix<3, 4, qreal> QMatrix3x4; +typedef QGenericMatrix<4, 2, qreal> QMatrix4x2; +typedef QGenericMatrix<4, 3, qreal> QMatrix4x3; #ifndef QT_NO_DEBUG_STREAM -template -QDebug operator<<(QDebug dbg, const QGenericMatrix &m) +template +QDebug operator<<(QDebug dbg, const QGenericMatrix &m) { dbg.nospace() << "QGenericMatrix<" << N << ", " << M - << ", " << QTypeInfo::name() << ", " << QTypeInfo::name() + << ", " << QTypeInfo::name() << ">(" << endl << qSetFieldWidth(10); for (int row = 0; row < M; ++row) { for (int col = 0; col < N; ++col) diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp index eb5858c..2164aca 100644 --- a/src/gui/math3d/qmatrix4x4.cpp +++ b/src/gui/math3d/qmatrix4x4.cpp @@ -103,7 +103,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) #if !defined(QT_NO_MEMBER_TEMPLATES) || defined(Q_QDOC) /*! - \fn QMatrix4x4::QMatrix4x4(const QGenericMatrix& matrix) + \fn QMatrix4x4::QMatrix4x4(const QGenericMatrix& matrix) Constructs a 4x4 matrix from the left-most 4 columns and top-most 4 rows of \a matrix. If \a matrix has less than 4 columns or rows, @@ -114,7 +114,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) */ /*! - \fn QGenericMatrix QMatrix4x4::toGenericMatrix() const + \fn QGenericMatrix QMatrix4x4::toGenericMatrix() const Constructs a NxM generic matrix from the left-most N columns and top-most M rows of this 4x4 matrix. If N or M is greater than 4, @@ -127,7 +127,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) #endif /*! - \fn QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix& matrix) + \fn QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix& matrix) \relates QMatrix4x4 Returns a 4x4 matrix constructed from the left-most 4 columns and @@ -139,7 +139,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) */ /*! - \fn QGenericMatrix qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) + \fn QGenericMatrix qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) \relates QMatrix4x4 Returns a NxM generic matrix constructed from the left-most N columns @@ -153,7 +153,7 @@ QMatrix4x4::QMatrix4x4(const qreal *values) /*! \internal */ -QMatrix4x4::QMatrix4x4(const float *values, int cols, int rows) +QMatrix4x4::QMatrix4x4(const qreal *values, int cols, int rows) { for (int col = 0; col < 4; ++col) { for (int row = 0; row < 4; ++row) { @@ -233,15 +233,16 @@ QMatrix4x4::QMatrix4x4(const QTransform& transform) } /*! - \fn qreal QMatrix4x4::operator()(int row, int column) const + \fn const qreal& QMatrix4x4::operator()(int row, int column) const - Returns the element at position (\a row, \a column) in this matrix. + Returns a constant reference to the element at position + (\a row, \a column) in this matrix. \sa column(), row() */ /*! - \fn float& QMatrix4x4::operator()(int row, int column) + \fn qreal& QMatrix4x4::operator()(int row, int column) Returns a reference to the element at position (\a row, \a column) in this matrix so that the element can be assigned to. @@ -312,8 +313,8 @@ QMatrix4x4::QMatrix4x4(const QTransform& transform) // | A B C | // M = | D E F | det(M) = A * (EI - HF) - B * (DI - GF) + C * (DH - GE) // | G H I | -static inline float matrixDet3 - (const float m[4][4], int col0, int col1, int col2, +static inline qreal matrixDet3 + (const qreal m[4][4], int col0, int col1, int col2, int row0, int row1, int row2) { return m[col0][row0] * @@ -328,9 +329,9 @@ static inline float matrixDet3 } // Calculate the determinant of a 4x4 matrix. -static inline float matrixDet4(const float m[4][4]) +static inline qreal matrixDet4(const qreal m[4][4]) { - float det; + qreal det; det = m[0][0] * matrixDet3(m, 1, 2, 3, 1, 2, 3); det -= m[1][0] * matrixDet3(m, 0, 2, 3, 1, 2, 3); det += m[2][0] * matrixDet3(m, 0, 1, 3, 1, 2, 3); @@ -382,7 +383,7 @@ QMatrix4x4 QMatrix4x4::inverted(bool *invertible) const QMatrix4x4 inv(1); // The "1" says to not load the identity. - float det = matrixDet4(m); + qreal det = matrixDet4(m); if (det == 0.0f) { if (invertible) *invertible = false; @@ -436,12 +437,12 @@ QMatrix3x3 QMatrix4x4::normalMatrix() const return inv; } - float det = matrixDet3(m, 0, 1, 2, 0, 1, 2); + qreal det = matrixDet3(m, 0, 1, 2, 0, 1, 2); if (det == 0.0f) return inv; det = 1.0f / det; - float *invm = inv.data(); + qreal *invm = inv.data(); // Invert and transpose in a single step. invm[0 + 0 * 3] = (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * det; @@ -697,9 +698,9 @@ QMatrix4x4 operator/(const QMatrix4x4& matrix, qreal divisor) */ QMatrix4x4& QMatrix4x4::scale(const QVector3D& vector) { - float vx = vector.xp; - float vy = vector.yp; - float vz = vector.zp; + qreal vx = vector.x(); + qreal vy = vector.y(); + qreal vz = vector.z(); if (flagBits == Identity) { m[0][0] = vx; m[1][1] = vy; @@ -743,28 +744,26 @@ QMatrix4x4& QMatrix4x4::scale(const QVector3D& vector) */ QMatrix4x4& QMatrix4x4::scale(qreal x, qreal y) { - float vx(x); - float vy(y); if (flagBits == Identity) { - m[0][0] = vx; - m[1][1] = vy; + m[0][0] = x; + m[1][1] = y; flagBits = Scale; } else if (flagBits == Scale || flagBits == (Scale | Translation)) { - m[0][0] *= vx; - m[1][1] *= vy; + m[0][0] *= x; + m[1][1] *= y; } else if (flagBits == Translation) { - m[0][0] = vx; - m[1][1] = vy; + m[0][0] = x; + m[1][1] = y; flagBits |= Scale; } else { - m[0][0] *= vx; - m[0][1] *= vx; - m[0][2] *= vx; - m[0][3] *= vx; - m[1][0] *= vy; - m[1][1] *= vy; - m[1][2] *= vy; - m[1][3] *= vy; + m[0][0] *= x; + m[0][1] *= x; + m[0][2] *= x; + m[0][3] *= x; + m[1][0] *= y; + m[1][1] *= y; + m[1][2] *= y; + m[1][3] *= y; flagBits = General; } return *this; @@ -780,36 +779,33 @@ QMatrix4x4& QMatrix4x4::scale(qreal x, qreal y) */ QMatrix4x4& QMatrix4x4::scale(qreal x, qreal y, qreal z) { - float vx(x); - float vy(y); - float vz(z); if (flagBits == Identity) { - m[0][0] = vx; - m[1][1] = vy; - m[2][2] = vz; + m[0][0] = x; + m[1][1] = y; + m[2][2] = z; flagBits = Scale; } else if (flagBits == Scale || flagBits == (Scale | Translation)) { - m[0][0] *= vx; - m[1][1] *= vy; - m[2][2] *= vz; + m[0][0] *= x; + m[1][1] *= y; + m[2][2] *= z; } else if (flagBits == Translation) { - m[0][0] = vx; - m[1][1] = vy; - m[2][2] = vz; + m[0][0] = x; + m[1][1] = y; + m[2][2] = z; flagBits |= Scale; } else { - m[0][0] *= vx; - m[0][1] *= vx; - m[0][2] *= vx; - m[0][3] *= vx; - m[1][0] *= vy; - m[1][1] *= vy; - m[1][2] *= vy; - m[1][3] *= vy; - m[2][0] *= vz; - m[2][1] *= vz; - m[2][2] *= vz; - m[2][3] *= vz; + m[0][0] *= x; + m[0][1] *= x; + m[0][2] *= x; + m[0][3] *= x; + m[1][0] *= y; + m[1][1] *= y; + m[1][2] *= y; + m[1][3] *= y; + m[2][0] *= z; + m[2][1] *= z; + m[2][2] *= z; + m[2][3] *= z; flagBits = General; } return *this; @@ -866,9 +862,9 @@ QMatrix4x4& QMatrix4x4::scale(qreal factor) */ QMatrix4x4& QMatrix4x4::translate(const QVector3D& vector) { - float vx = vector.xp; - float vy = vector.yp; - float vz = vector.zp; + qreal vx = vector.x(); + qreal vy = vector.y(); + qreal vz = vector.z(); if (flagBits == Identity) { m[3][0] = vx; m[3][1] = vy; @@ -912,28 +908,26 @@ QMatrix4x4& QMatrix4x4::translate(const QVector3D& vector) */ QMatrix4x4& QMatrix4x4::translate(qreal x, qreal y) { - float vx(x); - float vy(y); if (flagBits == Identity) { - m[3][0] = vx; - m[3][1] = vy; + m[3][0] = x; + m[3][1] = y; flagBits = Translation; } else if (flagBits == Translation) { - m[3][0] += vx; - m[3][1] += vy; + m[3][0] += x; + m[3][1] += y; } else if (flagBits == Scale) { - m[3][0] = m[0][0] * vx; - m[3][1] = m[1][1] * vy; + m[3][0] = m[0][0] * x; + m[3][1] = m[1][1] * y; m[3][2] = 0.; flagBits |= Translation; } else if (flagBits == (Scale | Translation)) { - m[3][0] += m[0][0] * vx; - m[3][1] += m[1][1] * vy; + m[3][0] += m[0][0] * x; + m[3][1] += m[1][1] * y; } else { - m[3][0] += m[0][0] * vx + m[1][0] * vy; - m[3][1] += m[0][1] * vx + m[1][1] * vy; - m[3][2] += m[0][2] * vx + m[1][2] * vy; - m[3][3] += m[0][3] * vx + m[1][3] * vy; + m[3][0] += m[0][0] * x + m[1][0] * y; + m[3][1] += m[0][1] * x + m[1][1] * y; + m[3][2] += m[0][2] * x + m[1][2] * y; + m[3][3] += m[0][3] * x + m[1][3] * y; if (flagBits == Rotation) flagBits |= Translation; else if (flagBits != (Rotation | Translation)) @@ -952,32 +946,29 @@ QMatrix4x4& QMatrix4x4::translate(qreal x, qreal y) */ QMatrix4x4& QMatrix4x4::translate(qreal x, qreal y, qreal z) { - float vx(x); - float vy(y); - float vz(z); if (flagBits == Identity) { - m[3][0] = vx; - m[3][1] = vy; - m[3][2] = vz; + m[3][0] = x; + m[3][1] = y; + m[3][2] = z; flagBits = Translation; } else if (flagBits == Translation) { - m[3][0] += vx; - m[3][1] += vy; - m[3][2] += vz; + m[3][0] += x; + m[3][1] += y; + m[3][2] += z; } else if (flagBits == Scale) { - m[3][0] = m[0][0] * vx; - m[3][1] = m[1][1] * vy; - m[3][2] = m[2][2] * vz; + m[3][0] = m[0][0] * x; + m[3][1] = m[1][1] * y; + m[3][2] = m[2][2] * z; flagBits |= Translation; } else if (flagBits == (Scale | Translation)) { - m[3][0] += m[0][0] * vx; - m[3][1] += m[1][1] * vy; - m[3][2] += m[2][2] * vz; + m[3][0] += m[0][0] * x; + m[3][1] += m[1][1] * y; + m[3][2] += m[2][2] * z; } else { - m[3][0] += m[0][0] * vx + m[1][0] * vy + m[2][0] * vz; - m[3][1] += m[0][1] * vx + m[1][1] * vy + m[2][1] * vz; - m[3][2] += m[0][2] * vx + m[1][2] * vy + m[2][2] * vz; - m[3][3] += m[0][3] * vx + m[1][3] * vy + m[2][3] * vz; + m[3][0] += m[0][0] * x + m[1][0] * y + m[2][0] * z; + m[3][1] += m[0][1] * x + m[1][1] * y + m[2][1] * z; + m[3][2] += m[0][2] * x + m[1][2] * y + m[2][2] * z; + m[3][3] += m[0][3] * x + m[1][3] * y + m[2][3] * z; if (flagBits == Rotation) flagBits |= Translation; else if (flagBits != (Rotation | Translation)) @@ -1126,15 +1117,15 @@ QMatrix4x4& QMatrix4x4::rotate(const QQuaternion& quaternion) // Algorithm from: // http://www.j3d.org/matrix_faq/matrfaq_latest.html#Q54 QMatrix4x4 m(1); - float xx = quaternion.xp * quaternion.xp; - float xy = quaternion.xp * quaternion.yp; - float xz = quaternion.xp * quaternion.zp; - float xw = quaternion.xp * quaternion.wp; - float yy = quaternion.yp * quaternion.yp; - float yz = quaternion.yp * quaternion.zp; - float yw = quaternion.yp * quaternion.wp; - float zz = quaternion.zp * quaternion.zp; - float zw = quaternion.zp * quaternion.wp; + qreal xx = quaternion.x() * quaternion.x(); + qreal xy = quaternion.x() * quaternion.y(); + qreal xz = quaternion.x() * quaternion.z(); + qreal xw = quaternion.x() * quaternion.scalar(); + qreal yy = quaternion.y() * quaternion.y(); + qreal yz = quaternion.y() * quaternion.z(); + qreal yw = quaternion.y() * quaternion.scalar(); + qreal zz = quaternion.z() * quaternion.z(); + qreal zw = quaternion.z() * quaternion.scalar(); m.m[0][0] = 1.0f - 2 * (yy + zz); m.m[1][0] = 2 * (xy - zw); m.m[2][0] = 2 * (xz + yw); @@ -1222,11 +1213,11 @@ QMatrix4x4& QMatrix4x4::ortho(qreal left, qreal right, qreal bottom, qreal top, translate(QVector3D (-(left + right) / width, -(top + bottom) / invheight, - 0.0f, 1)); + 0.0f)); scale(QVector3D (2.0f / width, 2.0f / invheight, - -1.0f, 1)); + -1.0f)); return *this; } #endif @@ -1356,17 +1347,17 @@ QMatrix4x4& QMatrix4x4::lookAt(const QVector3D& eye, const QVector3D& center, co QMatrix4x4 m(1); - m.m[0][0] = side.xp; - m.m[1][0] = side.yp; - m.m[2][0] = side.zp; + m.m[0][0] = side.x(); + m.m[1][0] = side.y(); + m.m[2][0] = side.z(); m.m[3][0] = 0.0f; - m.m[0][1] = upVector.xp; - m.m[1][1] = upVector.yp; - m.m[2][1] = upVector.zp; + m.m[0][1] = upVector.x(); + m.m[1][1] = upVector.y(); + m.m[2][1] = upVector.z(); m.m[3][1] = 0.0f; - m.m[0][2] = -forward.xp; - m.m[1][2] = -forward.yp; - m.m[2][2] = -forward.zp; + m.m[0][2] = -forward.x(); + m.m[1][2] = -forward.y(); + m.m[2][2] = -forward.z(); m.m[3][2] = 0.0f; m.m[0][3] = 0.0f; m.m[1][3] = 0.0f; @@ -1434,9 +1425,9 @@ void QMatrix4x4::toValueArray(qreal *values) const */ QMatrix QMatrix4x4::toAffine() const { - return QMatrix(qreal(m[0][0]), qreal(m[0][1]), - qreal(m[1][0]), qreal(m[1][1]), - qreal(m[3][0]), qreal(m[3][1])); + return QMatrix(m[0][0], m[0][1], + m[1][0], m[1][1], + m[3][0], m[3][1]); } static const qreal inv_dist_to_plane = 1. / 1024.; @@ -1462,15 +1453,12 @@ QTransform QMatrix4x4::toTransform(qreal distanceToPlane) const { if (distanceToPlane == 1024.0f) { // Optimize the common case with constants. - return QTransform(qreal(m[0][0]), qreal(m[0][1]), - qreal(m[0][3]) - qreal(m[0][2]) * - inv_dist_to_plane, - qreal(m[1][0]), qreal(m[1][1]), - qreal(m[1][3]) - qreal(m[1][2]) * - inv_dist_to_plane, - qreal(m[3][0]), qreal(m[3][1]), - qreal(m[3][3]) - qreal(m[3][2]) * - inv_dist_to_plane); + return QTransform(m[0][0], m[0][1], + m[0][3] - m[0][2] * inv_dist_to_plane, + m[1][0], m[1][1], + m[1][3] - m[1][2] * inv_dist_to_plane, + m[3][0], m[3][1], + m[3][3] - m[3][2] * inv_dist_to_plane); } else if (distanceToPlane != 0.0f) { // The following projection matrix is pre-multiplied with "matrix": // | 1 0 0 0 | @@ -1480,17 +1468,14 @@ QTransform QMatrix4x4::toTransform(qreal distanceToPlane) const // where d = -1 / distanceToPlane. After projection, row 3 and // column 3 are dropped to form the final QTransform. qreal d = 1.0f / distanceToPlane; - return QTransform(qreal(m[0][0]), qreal(m[0][1]), - qreal(m[0][3]) - qreal(m[0][2]) * d, - qreal(m[1][0]), qreal(m[1][1]), - qreal(m[1][3]) - qreal(m[1][2]) * d, - qreal(m[3][0]), qreal(m[3][1]), - qreal(m[3][3]) - qreal(m[3][2]) * d); + return QTransform(m[0][0], m[0][1], m[0][3] - m[0][2] * d, + m[1][0], m[1][1], m[1][3] - m[1][2] * d, + m[3][0], m[3][1], m[3][3] - m[3][2] * d); } else { // Orthographic projection: drop row 3 and column 3. - return QTransform(qreal(m[0][0]), qreal(m[0][1]), qreal(m[0][3]), - qreal(m[1][0]), qreal(m[1][1]), qreal(m[1][3]), - qreal(m[3][0]), qreal(m[3][1]), qreal(m[3][3])); + return QTransform(m[0][0], m[0][1], m[0][3], + m[1][0], m[1][1], m[1][3], + m[3][0], m[3][1], m[3][3]); } } @@ -1618,28 +1603,25 @@ QRectF QMatrix4x4::mapRect(const QRectF& rect) const } /*! - \fn float *QMatrix4x4::data() + \fn qreal *QMatrix4x4::data() - Returns a pointer to the raw data of this matrix. This is intended - for use with raw GL functions. + Returns a pointer to the raw data of this matrix. \sa constData(), inferSpecialType() */ /*! - \fn const float *QMatrix4x4::data() const + \fn const qreal *QMatrix4x4::data() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa constData() */ /*! - \fn const float *QMatrix4x4::constData() const + \fn const qreal *QMatrix4x4::constData() const Returns a constant pointer to the raw data of this matrix. - This is intended for use with raw GL functions. \sa data() */ @@ -1695,7 +1677,7 @@ void QMatrix4x4::extractAxisRotation(qreal &angle, QVector3D &axis) const { // Orientation is dependent on the upper 3x3 matrix; subtract the // homogeneous scaling element from the trace of the 4x4 matrix - float tr = m[0][0] + m[1][1] + m[2][2]; + qreal tr = m[0][0] + m[1][1] + m[2][2]; qreal cosa = qreal(0.5f * (tr - 1.0f)); angle = acos(cosa) * 180.0f / M_PI; @@ -1708,38 +1690,38 @@ void QMatrix4x4::extractAxisRotation(qreal &angle, QVector3D &axis) const } if (angle < 180.0f) { - axis.xp = m[1][2] - m[2][1]; - axis.yp = m[2][0] - m[0][2]; - axis.zp = m[0][1] - m[1][0]; + axis.setX(m[1][2] - m[2][1]); + axis.setY(m[2][0] - m[0][2]); + axis.setZ(m[0][1] - m[1][0]); axis.normalize(); return; } // rads == PI - float tmp; + qreal tmp; // r00 is maximum if ((m[0][0] >= m[2][2]) && (m[0][0] >= m[1][1])) { - axis.xp = 0.5f * qSqrt(m[0][0] - m[1][1] - m[2][2] + 1.0f); + axis.setX(0.5f * qSqrt(m[0][0] - m[1][1] - m[2][2] + 1.0f)); tmp = 0.5f / axis.x(); - axis.yp = m[1][0] * tmp; - axis.zp = m[2][0] * tmp; + axis.setY(m[1][0] * tmp); + axis.setZ(m[2][0] * tmp); } // r11 is maximum if ((m[1][1] >= m[2][2]) && (m[1][1] >= m[0][0])) { - axis.yp = 0.5f * qSqrt(m[1][1] - m[0][0] - m[2][2] + 1.0f); + axis.setY(0.5f * qSqrt(m[1][1] - m[0][0] - m[2][2] + 1.0f)); tmp = 0.5f / axis.y(); - axis.xp = tmp * m[1][0]; - axis.zp = tmp * m[2][1]; + axis.setX(tmp * m[1][0]); + axis.setZ(tmp * m[2][1]); } // r22 is maximum if ((m[2][2] >= m[1][1]) && (m[2][2] >= m[0][0])) { - axis.zp = 0.5f * qSqrt(m[2][2] - m[0][0] - m[1][1] + 1.0f); + axis.setZ(0.5f * qSqrt(m[2][2] - m[0][0] - m[1][1] + 1.0f)); tmp = 0.5f / axis.z(); - axis.xp = m[2][0]*tmp; - axis.yp = m[2][1]*tmp; + axis.setX(m[2][0]*tmp); + axis.setY(m[2][1]*tmp); } } @@ -1756,7 +1738,7 @@ QVector3D QMatrix4x4::extractTranslation() const return QVector3D (m[0][0] * m[3][0] + m[0][1] * m[3][1] + m[0][2] * m[3][2], m[1][0] * m[3][0] + m[1][1] * m[3][1] + m[1][2] * m[3][2], - m[2][0] * m[3][0] + m[2][1] * m[3][1] + m[2][2] * m[3][2], 1); + m[2][0] * m[3][0] + m[2][1] * m[3][1] + m[2][2] * m[3][2]); } #endif @@ -1894,7 +1876,7 @@ QDataStream &operator>>(QDataStream &stream, QMatrix4x4 &matrix) for (int row = 0; row < 4; ++row) { for (int col = 0; col < 4; ++col) { stream >> x; - matrix(row, col) = float(x); + matrix(row, col) = qreal(x); } } matrix.inferSpecialType(); diff --git a/src/gui/math3d/qmatrix4x4.h b/src/gui/math3d/qmatrix4x4.h index 4207bdf..8811027 100644 --- a/src/gui/math3d/qmatrix4x4.h +++ b/src/gui/math3d/qmatrix4x4.h @@ -71,14 +71,14 @@ public: qreal m41, qreal m42, qreal m43, qreal m44); #if !defined(QT_NO_MEMBER_TEMPLATES) || defined(Q_QDOC) template - explicit QMatrix4x4(const QGenericMatrix& matrix); + explicit QMatrix4x4(const QGenericMatrix& matrix); #endif - QMatrix4x4(const float *values, int cols, int rows); + QMatrix4x4(const qreal *values, int cols, int rows); QMatrix4x4(const QTransform& transform); QMatrix4x4(const QMatrix& matrix); - inline qreal operator()(int row, int column) const; - inline float& operator()(int row, int column); + inline const qreal& operator()(int row, int column) const; + inline qreal& operator()(int row, int column); inline QVector4D column(int index) const; inline void setColumn(int index, const QVector4D& value); @@ -174,12 +174,12 @@ public: #if !defined(QT_NO_MEMBER_TEMPLATES) || defined(Q_QDOC) template - QGenericMatrix toGenericMatrix() const; + QGenericMatrix toGenericMatrix() const; #endif - inline float *data(); - inline const float *data() const { return m[0]; } - inline const float *constData() const { return m[0]; } + inline qreal *data(); + inline const qreal *data() const { return m[0]; } + inline const qreal *constData() const { return m[0]; } void inferSpecialType(); @@ -190,7 +190,7 @@ public: #endif private: - float m[4][4]; // Column-major order to match OpenGL. + qreal m[4][4]; // Column-major order to match OpenGL. int flagBits; // Flag bits from the enum below. enum { @@ -224,9 +224,9 @@ inline QMatrix4x4::QMatrix4x4 template Q_INLINE_TEMPLATE QMatrix4x4::QMatrix4x4 - (const QGenericMatrix& matrix) + (const QGenericMatrix& matrix) { - const float *values = matrix.constData(); + const qreal *values = matrix.constData(); for (int col = 0; col < 4; ++col) { for (int row = 0; row < 4; ++row) { if (col < N && row < M) @@ -241,10 +241,10 @@ Q_INLINE_TEMPLATE QMatrix4x4::QMatrix4x4 } template -QGenericMatrix QMatrix4x4::toGenericMatrix() const +QGenericMatrix QMatrix4x4::toGenericMatrix() const { - QGenericMatrix result; - float *values = result.data(); + QGenericMatrix result; + qreal *values = result.data(); for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { if (col < 4 && row < 4) @@ -260,13 +260,13 @@ QGenericMatrix QMatrix4x4::toGenericMatrix() const #endif -inline qreal QMatrix4x4::operator()(int row, int column) const +inline const qreal& QMatrix4x4::operator()(int row, int column) const { Q_ASSERT(row >= 0 && row < 4 && column >= 0 && column < 4); - return qreal(m[column][row]); + return m[column][row]; } -inline float& QMatrix4x4::operator()(int row, int column) +inline qreal& QMatrix4x4::operator()(int row, int column) { Q_ASSERT(row >= 0 && row < 4 && column >= 0 && column < 4); flagBits = General; @@ -276,32 +276,32 @@ inline float& QMatrix4x4::operator()(int row, int column) inline QVector4D QMatrix4x4::column(int index) const { Q_ASSERT(index >= 0 && index < 4); - return QVector4D(m[index][0], m[index][1], m[index][2], m[index][3], 1); + return QVector4D(m[index][0], m[index][1], m[index][2], m[index][3]); } inline void QMatrix4x4::setColumn(int index, const QVector4D& value) { Q_ASSERT(index >= 0 && index < 4); - m[index][0] = value.xp; - m[index][1] = value.yp; - m[index][2] = value.zp; - m[index][3] = value.wp; + m[index][0] = value.x(); + m[index][1] = value.y(); + m[index][2] = value.z(); + m[index][3] = value.w(); flagBits = General; } inline QVector4D QMatrix4x4::row(int index) const { Q_ASSERT(index >= 0 && index < 4); - return QVector4D(m[0][index], m[1][index], m[2][index], m[3][index], 1); + return QVector4D(m[0][index], m[1][index], m[2][index], m[3][index]); } inline void QMatrix4x4::setRow(int index, const QVector4D& value) { Q_ASSERT(index >= 0 && index < 4); - m[0][index] = value.xp; - m[1][index] = value.yp; - m[2][index] = value.zp; - m[3][index] = value.wp; + m[0][index] = value.x(); + m[1][index] = value.y(); + m[2][index] = value.z(); + m[3][index] = value.w(); flagBits = General; } @@ -608,68 +608,68 @@ inline QMatrix4x4 operator*(const QMatrix4x4& m1, const QMatrix4x4& m2) inline QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix) { - float x, y, z, w; - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[0][1] + - vector.zp * matrix.m[0][2] + + qreal x, y, z, w; + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[0][1] + + vector.z() * matrix.m[0][2] + matrix.m[0][3]; - y = vector.xp * matrix.m[1][0] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[1][2] + + y = vector.x() * matrix.m[1][0] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[1][2] + matrix.m[1][3]; - z = vector.xp * matrix.m[2][0] + - vector.yp * matrix.m[2][1] + - vector.zp * matrix.m[2][2] + + z = vector.x() * matrix.m[2][0] + + vector.y() * matrix.m[2][1] + + vector.z() * matrix.m[2][2] + matrix.m[2][3]; - w = vector.xp * matrix.m[3][0] + - vector.yp * matrix.m[3][1] + - vector.zp * matrix.m[3][2] + + w = vector.x() * matrix.m[3][0] + + vector.y() * matrix.m[3][1] + + vector.z() * matrix.m[3][2] + matrix.m[3][3]; if (w == 1.0f) - return QVector3D(x, y, z, 1); + return QVector3D(x, y, z); else - return QVector3D(x / w, y / w, z / w, 1); + return QVector3D(x / w, y / w, z / w); } inline QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector) { - float x, y, z, w; + qreal x, y, z, w; if (matrix.flagBits == QMatrix4x4::Identity) { return vector; } else if (matrix.flagBits == QMatrix4x4::Translation) { - return QVector3D(vector.xp + matrix.m[3][0], - vector.yp + matrix.m[3][1], - vector.zp + matrix.m[3][2], 1); + return QVector3D(vector.x() + matrix.m[3][0], + vector.y() + matrix.m[3][1], + vector.z() + matrix.m[3][2]); } else if (matrix.flagBits == (QMatrix4x4::Translation | QMatrix4x4::Scale)) { - return QVector3D(vector.xp * matrix.m[0][0] + matrix.m[3][0], - vector.yp * matrix.m[1][1] + matrix.m[3][1], - vector.zp * matrix.m[2][2] + matrix.m[3][2], 1); + return QVector3D(vector.x() * matrix.m[0][0] + matrix.m[3][0], + vector.y() * matrix.m[1][1] + matrix.m[3][1], + vector.z() * matrix.m[2][2] + matrix.m[3][2]); } else if (matrix.flagBits == QMatrix4x4::Scale) { - return QVector3D(vector.xp * matrix.m[0][0], - vector.yp * matrix.m[1][1], - vector.zp * matrix.m[2][2], 1); + return QVector3D(vector.x() * matrix.m[0][0], + vector.y() * matrix.m[1][1], + vector.z() * matrix.m[2][2]); } else { - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[1][0] + - vector.zp * matrix.m[2][0] + + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[1][0] + + vector.z() * matrix.m[2][0] + matrix.m[3][0]; - y = vector.xp * matrix.m[0][1] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[2][1] + + y = vector.x() * matrix.m[0][1] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[2][1] + matrix.m[3][1]; - z = vector.xp * matrix.m[0][2] + - vector.yp * matrix.m[1][2] + - vector.zp * matrix.m[2][2] + + z = vector.x() * matrix.m[0][2] + + vector.y() * matrix.m[1][2] + + vector.z() * matrix.m[2][2] + matrix.m[3][2]; - w = vector.xp * matrix.m[0][3] + - vector.yp * matrix.m[1][3] + - vector.zp * matrix.m[2][3] + + w = vector.x() * matrix.m[0][3] + + vector.y() * matrix.m[1][3] + + vector.z() * matrix.m[2][3] + matrix.m[3][3]; if (w == 1.0f) - return QVector3D(x, y, z, 1); + return QVector3D(x, y, z); else - return QVector3D(x / w, y / w, z / w, 1); + return QVector3D(x / w, y / w, z / w); } } @@ -679,54 +679,54 @@ inline QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector) inline QVector4D operator*(const QVector4D& vector, const QMatrix4x4& matrix) { - float x, y, z, w; - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[0][1] + - vector.zp * matrix.m[0][2] + - vector.wp * matrix.m[0][3]; - y = vector.xp * matrix.m[1][0] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[1][2] + - vector.wp * matrix.m[1][3]; - z = vector.xp * matrix.m[2][0] + - vector.yp * matrix.m[2][1] + - vector.zp * matrix.m[2][2] + - vector.wp * matrix.m[2][3]; - w = vector.xp * matrix.m[3][0] + - vector.yp * matrix.m[3][1] + - vector.zp * matrix.m[3][2] + - vector.wp * matrix.m[3][3]; - return QVector4D(x, y, z, w, 1); + qreal x, y, z, w; + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[0][1] + + vector.z() * matrix.m[0][2] + + vector.w() * matrix.m[0][3]; + y = vector.x() * matrix.m[1][0] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[1][2] + + vector.w() * matrix.m[1][3]; + z = vector.x() * matrix.m[2][0] + + vector.y() * matrix.m[2][1] + + vector.z() * matrix.m[2][2] + + vector.w() * matrix.m[2][3]; + w = vector.x() * matrix.m[3][0] + + vector.y() * matrix.m[3][1] + + vector.z() * matrix.m[3][2] + + vector.w() * matrix.m[3][3]; + return QVector4D(x, y, z, w); } inline QVector4D operator*(const QMatrix4x4& matrix, const QVector4D& vector) { - float x, y, z, w; - x = vector.xp * matrix.m[0][0] + - vector.yp * matrix.m[1][0] + - vector.zp * matrix.m[2][0] + - vector.wp * matrix.m[3][0]; - y = vector.xp * matrix.m[0][1] + - vector.yp * matrix.m[1][1] + - vector.zp * matrix.m[2][1] + - vector.wp * matrix.m[3][1]; - z = vector.xp * matrix.m[0][2] + - vector.yp * matrix.m[1][2] + - vector.zp * matrix.m[2][2] + - vector.wp * matrix.m[3][2]; - w = vector.xp * matrix.m[0][3] + - vector.yp * matrix.m[1][3] + - vector.zp * matrix.m[2][3] + - vector.wp * matrix.m[3][3]; - return QVector4D(x, y, z, w, 1); + qreal x, y, z, w; + x = vector.x() * matrix.m[0][0] + + vector.y() * matrix.m[1][0] + + vector.z() * matrix.m[2][0] + + vector.w() * matrix.m[3][0]; + y = vector.x() * matrix.m[0][1] + + vector.y() * matrix.m[1][1] + + vector.z() * matrix.m[2][1] + + vector.w() * matrix.m[3][1]; + z = vector.x() * matrix.m[0][2] + + vector.y() * matrix.m[1][2] + + vector.z() * matrix.m[2][2] + + vector.w() * matrix.m[3][2]; + w = vector.x() * matrix.m[0][3] + + vector.y() * matrix.m[1][3] + + vector.z() * matrix.m[2][3] + + vector.w() * matrix.m[3][3]; + return QVector4D(x, y, z, w); } #endif inline QPoint operator*(const QPoint& point, const QMatrix4x4& matrix) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); x = xin * matrix.m[0][0] + @@ -746,8 +746,8 @@ inline QPoint operator*(const QPoint& point, const QMatrix4x4& matrix) inline QPointF operator*(const QPointF& point, const QMatrix4x4& matrix) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); x = xin * matrix.m[0][0] + @@ -768,8 +768,8 @@ inline QPointF operator*(const QPointF& point, const QMatrix4x4& matrix) inline QPoint operator*(const QMatrix4x4& matrix, const QPoint& point) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); if (matrix.flagBits == QMatrix4x4::Identity) { @@ -803,8 +803,8 @@ inline QPoint operator*(const QMatrix4x4& matrix, const QPoint& point) inline QPointF operator*(const QMatrix4x4& matrix, const QPointF& point) { - float xin, yin; - float x, y, w; + qreal xin, yin; + qreal x, y, w; xin = point.x(); yin = point.y(); if (matrix.flagBits == QMatrix4x4::Identity) { @@ -951,7 +951,7 @@ inline QVector4D QMatrix4x4::map(const QVector4D& point) const #endif -inline float *QMatrix4x4::data() +inline qreal *QMatrix4x4::data() { // We have to assume that the caller will modify the matrix elements, // so we flip it over to "General" mode. @@ -969,17 +969,17 @@ Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QMatrix4x4 &); #endif template -QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix& matrix) +QMatrix4x4 qGenericMatrixToMatrix4x4(const QGenericMatrix& matrix) { return QMatrix4x4(matrix.constData(), N, M); } template -QGenericMatrix qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) +QGenericMatrix qGenericMatrixFromMatrix4x4(const QMatrix4x4& matrix) { - QGenericMatrix result; - const float *m = matrix.constData(); - float *values = result.data(); + QGenericMatrix result; + const qreal *m = matrix.constData(); + qreal *values = result.data(); for (int col = 0; col < N; ++col) { for (int row = 0; row < M; ++row) { if (col < 4 && row < 4) diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp index ece4482..7206e9a 100644 --- a/src/gui/math3d/qquaternion.cpp +++ b/src/gui/math3d/qquaternion.cpp @@ -353,7 +353,7 @@ QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, qreal angle) qreal s = qSin(a); qreal c = qCos(a); QVector3D ax = axis.normalized(); - return QQuaternion(c, ax.xp * s, ax.yp * s, ax.zp * s, 1).normalized(); + return QQuaternion(c, ax.x() * s, ax.y() * s, ax.z() * s).normalized(); } #endif @@ -365,19 +365,16 @@ QQuaternion QQuaternion::fromAxisAndAngle(const QVector3D& axis, qreal angle) QQuaternion QQuaternion::fromAxisAndAngle (qreal x, qreal y, qreal z, qreal angle) { - float xp = x; - float yp = y; - float zp = z; - qreal length = qSqrt(xp * xp + yp * yp + zp * zp); - if (!qIsNull(length)) { - xp /= length; - yp /= length; - zp /= length; + qreal length = qSqrt(x * x + y * y + z * z); + if (!qFuzzyIsNull(length - 1.0f) && !qFuzzyIsNull(length)) { + x /= length; + y /= length; + z /= length; } qreal a = (angle / 2.0f) * M_PI / 180.0f; qreal s = qSin(a); qreal c = qCos(a); - return QQuaternion(c, xp * s, yp * s, zp * s, 1).normalized(); + return QQuaternion(c, x * s, y * s, z * s).normalized(); } /*! diff --git a/src/gui/math3d/qquaternion.h b/src/gui/math3d/qquaternion.h index 12576d2..f243c42 100644 --- a/src/gui/math3d/qquaternion.h +++ b/src/gui/math3d/qquaternion.h @@ -133,11 +133,7 @@ public: (const QQuaternion& q1, const QQuaternion& q2, qreal t); private: - float wp, xp, yp, zp; - - friend class QMatrix4x4; - - QQuaternion(float scalar, float xpos, float ypos, float zpos, int dummy); + qreal wp, xp, yp, zp; }; inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {} @@ -145,8 +141,6 @@ inline QQuaternion::QQuaternion() : wp(1.0f), xp(0.0f), yp(0.0f), zp(0.0f) {} inline QQuaternion::QQuaternion(qreal scalar, qreal xpos, qreal ypos, qreal zpos) : wp(scalar), xp(xpos), yp(ypos), zp(zpos) {} -inline QQuaternion::QQuaternion(float scalar, float xpos, float ypos, float zpos, int) : wp(scalar), xp(xpos), yp(ypos), zp(zpos) {} - inline bool QQuaternion::isNull() const { return qIsNull(xp) && qIsNull(yp) && qIsNull(zp) && qIsNull(wp); @@ -169,7 +163,7 @@ inline void QQuaternion::setScalar(qreal scalar) { wp = scalar; } inline QQuaternion QQuaternion::conjugate() const { - return QQuaternion(wp, -xp, -yp, -zp, 1); + return QQuaternion(wp, -xp, -yp, -zp); } inline QQuaternion &QQuaternion::operator+=(const QQuaternion &quaternion) @@ -201,18 +195,18 @@ inline QQuaternion &QQuaternion::operator*=(qreal factor) inline const QQuaternion operator*(const QQuaternion &q1, const QQuaternion& q2) { - float ww = (q1.zp + q1.xp) * (q2.xp + q2.yp); - float yy = (q1.wp - q1.yp) * (q2.wp + q2.zp); - float zz = (q1.wp + q1.yp) * (q2.wp - q2.zp); - float xx = ww + yy + zz; - float qq = 0.5 * (xx + (q1.zp - q1.xp) * (q2.xp - q2.yp)); - - float w = qq - ww + (q1.zp - q1.yp) * (q2.yp - q2.zp); - float x = qq - xx + (q1.xp + q1.wp) * (q2.xp + q2.wp); - float y = qq - yy + (q1.wp - q1.xp) * (q2.yp + q2.zp); - float z = qq - zz + (q1.zp + q1.yp) * (q2.wp - q2.xp); - - return QQuaternion(w, x, y, z, 1); + qreal ww = (q1.zp + q1.xp) * (q2.xp + q2.yp); + qreal yy = (q1.wp - q1.yp) * (q2.wp + q2.zp); + qreal zz = (q1.wp + q1.yp) * (q2.wp - q2.zp); + qreal xx = ww + yy + zz; + qreal qq = 0.5 * (xx + (q1.zp - q1.xp) * (q2.xp - q2.yp)); + + qreal w = qq - ww + (q1.zp - q1.yp) * (q2.yp - q2.zp); + qreal x = qq - xx + (q1.xp + q1.wp) * (q2.xp + q2.wp); + qreal y = qq - yy + (q1.wp - q1.xp) * (q2.yp + q2.zp); + qreal z = qq - zz + (q1.zp + q1.yp) * (q2.wp - q2.xp); + + return QQuaternion(w, x, y, z); } inline QQuaternion &QQuaternion::operator*=(const QQuaternion &quaternion) @@ -242,32 +236,32 @@ inline bool operator!=(const QQuaternion &q1, const QQuaternion &q2) inline const QQuaternion operator+(const QQuaternion &q1, const QQuaternion &q2) { - return QQuaternion(q1.wp + q2.wp, q1.xp + q2.xp, q1.yp + q2.yp, q1.zp + q2.zp, 1); + return QQuaternion(q1.wp + q2.wp, q1.xp + q2.xp, q1.yp + q2.yp, q1.zp + q2.zp); } inline const QQuaternion operator-(const QQuaternion &q1, const QQuaternion &q2) { - return QQuaternion(q1.wp - q2.wp, q1.xp - q2.xp, q1.yp - q2.yp, q1.zp - q2.zp, 1); + return QQuaternion(q1.wp - q2.wp, q1.xp - q2.xp, q1.yp - q2.yp, q1.zp - q2.zp); } inline const QQuaternion operator*(qreal factor, const QQuaternion &quaternion) { - return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor, 1); + return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor); } inline const QQuaternion operator*(const QQuaternion &quaternion, qreal factor) { - return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor, 1); + return QQuaternion(quaternion.wp * factor, quaternion.xp * factor, quaternion.yp * factor, quaternion.zp * factor); } inline const QQuaternion operator-(const QQuaternion &quaternion) { - return QQuaternion(-quaternion.wp, -quaternion.xp, -quaternion.yp, -quaternion.zp, 1); + return QQuaternion(-quaternion.wp, -quaternion.xp, -quaternion.yp, -quaternion.zp); } inline const QQuaternion operator/(const QQuaternion &quaternion, qreal divisor) { - return QQuaternion(quaternion.wp / divisor, quaternion.xp / divisor, quaternion.yp / divisor, quaternion.zp / divisor, 1); + return QQuaternion(quaternion.wp / divisor, quaternion.xp / divisor, quaternion.yp / divisor, quaternion.zp / divisor); } inline bool qFuzzyCompare(const QQuaternion& q1, const QQuaternion& q2) @@ -281,18 +275,18 @@ inline bool qFuzzyCompare(const QQuaternion& q1, const QQuaternion& q2) #ifndef QT_NO_VECTOR3D inline QQuaternion::QQuaternion(qreal scalar, const QVector3D& vector) - : wp(scalar), xp(vector.xp), yp(vector.yp), zp(vector.zp) {} + : wp(scalar), xp(vector.x()), yp(vector.y()), zp(vector.z()) {} inline void QQuaternion::setVector(const QVector3D& vector) { - xp = vector.xp; - yp = vector.yp; - zp = vector.zp; + xp = vector.x(); + yp = vector.y(); + zp = vector.z(); } inline QVector3D QQuaternion::vector() const { - return QVector3D(xp, yp, zp, 1); + return QVector3D(xp, yp, zp); } #endif @@ -307,11 +301,11 @@ inline void QQuaternion::setVector(qreal x, qreal y, qreal z) #ifndef QT_NO_VECTOR4D inline QQuaternion::QQuaternion(const QVector4D& vector) - : wp(vector.wp), xp(vector.xp), yp(vector.yp), zp(vector.zp) {} + : wp(vector.w()), xp(vector.x()), yp(vector.y()), zp(vector.z()) {} inline QVector4D QQuaternion::toVector4D() const { - return QVector4D(xp, yp, zp, wp, 1); + return QVector4D(xp, yp, zp, wp); } #endif diff --git a/src/gui/math3d/qvector3d.h b/src/gui/math3d/qvector3d.h index 767517e..1e95865 100644 --- a/src/gui/math3d/qvector3d.h +++ b/src/gui/math3d/qvector3d.h @@ -54,7 +54,6 @@ QT_MODULE(Gui) class QMatrix4x4; class QVector2D; class QVector4D; -class QQuaternion; #ifndef QT_NO_VECTOR3D @@ -136,8 +135,6 @@ private: friend class QVector2D; friend class QVector4D; - friend class QQuaternion; - friend class QMatrix4x4; #ifndef QT_NO_MATRIX4X4 friend QVector3D operator*(const QVector3D& vector, const QMatrix4x4& matrix); friend QVector3D operator*(const QMatrix4x4& matrix, const QVector3D& vector); diff --git a/src/gui/math3d/qvector4d.h b/src/gui/math3d/qvector4d.h index 4bd6639..520319a 100644 --- a/src/gui/math3d/qvector4d.h +++ b/src/gui/math3d/qvector4d.h @@ -54,7 +54,6 @@ QT_MODULE(Gui) class QMatrix4x4; class QVector2D; class QVector3D; -class QQuaternion; #ifndef QT_NO_VECTOR4D @@ -133,8 +132,6 @@ private: friend class QVector2D; friend class QVector3D; - friend class QQuaternion; - friend class QMatrix4x4; #ifndef QT_NO_MATRIX4X4 friend QVector4D operator*(const QVector4D& vector, const QMatrix4x4& matrix); friend QVector4D operator*(const QMatrix4x4& matrix, const QVector4D& vector); diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 56b55d0..bcc6c61 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -2288,6 +2288,58 @@ void QGLShaderProgram::setUniformValue(const char *name, const QSizeF& size) setUniformValue(uniformLocation(name), size); } +// We have to repack matrices from qreal to GLfloat. +#define setUniformMatrix(func,location,value,cols,rows) \ + if (location == -1) \ + return; \ + if (sizeof(qreal) == sizeof(GLfloat)) { \ + func(location, 1, GL_FALSE, \ + reinterpret_cast(value.constData())); \ + } else { \ + GLfloat mat[cols * rows]; \ + const qreal *data = value.constData(); \ + for (int i = 0; i < cols * rows; ++i) \ + mat[i] = data[i]; \ + func(location, 1, GL_FALSE, mat); \ + } +#if !defined(QT_OPENGL_ES_2) +#define setUniformGenericMatrix(func,colfunc,location,value,cols,rows) \ + if (location == -1) \ + return; \ + if (sizeof(qreal) == sizeof(GLfloat)) { \ + const GLfloat *data = reinterpret_cast \ + (value.constData()); \ + if (func) \ + func(location, 1, GL_FALSE, data); \ + else \ + colfunc(location, cols, data); \ + } else { \ + GLfloat mat[cols * rows]; \ + const qreal *data = value.constData(); \ + for (int i = 0; i < cols * rows; ++i) \ + mat[i] = data[i]; \ + if (func) \ + func(location, 1, GL_FALSE, mat); \ + else \ + colfunc(location, cols, mat); \ + } +#else +#define setUniformGenericMatrix(func,colfunc,location,value,cols,rows) \ + if (location == -1) \ + return; \ + if (sizeof(qreal) == sizeof(GLfloat)) { \ + const GLfloat *data = reinterpret_cast \ + (value.constData()); \ + colfunc(location, cols, data); \ + } else { \ + GLfloat mat[cols * rows]; \ + const qreal *data = value.constData(); \ + for (int i = 0; i < cols * rows; ++i) \ + mat[i] = data[i]; \ + colfunc(location, cols, mat); \ + } +#endif + /*! Sets the uniform variable at \a location in the current context to a 2x2 matrix \a value. @@ -2296,8 +2348,7 @@ void QGLShaderProgram::setUniformValue(const char *name, const QSizeF& size) */ void QGLShaderProgram::setUniformValue(int location, const QMatrix2x2& value) { - if (location != -1) - glUniformMatrix2fv(location, 1, GL_FALSE, value.data()); + setUniformMatrix(glUniformMatrix2fv, location, value, 2, 2); } /*! @@ -2321,20 +2372,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix2x2& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix2x3& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix2x3fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix2x3fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform3fv(location, 2, value.data()); - } - } -#else - if (location != -1) - glUniform3fv(location, 2, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix2x3fv, glUniform3fv, location, value, 2, 3); } /*! @@ -2358,20 +2397,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix2x3& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix2x4& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix2x4fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix2x4fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform4fv(location, 2, value.data()); - } - } -#else - if (location != -1) - glUniform4fv(location, 2, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix2x4fv, glUniform4fv, location, value, 2, 4); } /*! @@ -2395,20 +2422,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix2x4& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix3x2& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix3x2fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix3x2fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform2fv(location, 3, value.data()); - } - } -#else - if (location != -1) - glUniform2fv(location, 3, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix3x2fv, glUniform2fv, location, value, 3, 2); } /*! @@ -2432,8 +2447,7 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix3x2& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix3x3& value) { - if (location != -1) - glUniformMatrix3fv(location, 1, GL_FALSE, value.data()); + setUniformMatrix(glUniformMatrix3fv, location, value, 3, 3); } /*! @@ -2457,20 +2471,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix3x3& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix3x4& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix3x4fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix3x4fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform4fv(location, 3, value.data()); - } - } -#else - if (location != -1) - glUniform4fv(location, 3, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix3x4fv, glUniform4fv, location, value, 3, 4); } /*! @@ -2494,20 +2496,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix3x4& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix4x2& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix4x2fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix4x2fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform2fv(location, 4, value.data()); - } - } -#else - if (location != -1) - glUniform2fv(location, 4, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix4x2fv, glUniform2fv, location, value, 4, 2); } /*! @@ -2531,20 +2521,8 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix4x2& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix4x3& value) { -#if !defined(QT_OPENGL_ES_2) - if (location != -1) { - if (glUniformMatrix4x3fv) { - // OpenGL 2.1+: pass the matrix directly. - glUniformMatrix4x3fv(location, 1, GL_FALSE, value.data()); - } else { - // OpenGL 2.0: pass the matrix columns as a vector. - glUniform3fv(location, 4, value.data()); - } - } -#else - if (location != -1) - glUniform3fv(location, 4, value.data()); -#endif + setUniformGenericMatrix + (glUniformMatrix4x3fv, glUniform3fv, location, value, 4, 3); } /*! @@ -2568,8 +2546,7 @@ void QGLShaderProgram::setUniformValue(const char *name, const QMatrix4x3& value */ void QGLShaderProgram::setUniformValue(int location, const QMatrix4x4& value) { - if (location != -1) - glUniformMatrix4fv(location, 1, GL_FALSE, value.data()); + setUniformMatrix(glUniformMatrix4fv, location, value, 4, 4); } /*! @@ -2815,18 +2792,20 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QVector4D *v setUniformValueArray(uniformLocation(name), values, count); } -// We may have to repack matrix arrays if the matrix types -// contain additional flag bits. Especially QMatrix4x4. +// We have to repack matrix arrays from qreal to GLfloat. #define setUniformMatrixArray(func,location,values,count,type,cols,rows) \ if (location == -1 || count <= 0) \ return; \ - if (count == 1 || sizeof(type) == cols * rows * sizeof(GLfloat)) { \ - func(location, count, GL_FALSE, values->constData()); \ + if (sizeof(type) == sizeof(GLfloat) * cols * rows) { \ + func(location, count, GL_FALSE, \ + reinterpret_cast(values[0].constData())); \ } else { \ QVarLengthArray temp(cols * rows * count); \ for (int index = 0; index < count; ++index) { \ - qMemCopy(temp.data() + cols * rows * index, \ - values[index].constData(), cols * rows * sizeof(GLfloat)); \ + for (int index2 = 0; index2 < (cols * rows); ++index2) { \ + temp.data()[cols * rows * index + index2] = \ + values[index].constData()[index2]; \ + } \ } \ func(location, count, GL_FALSE, temp.constData()); \ } @@ -2834,16 +2813,20 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QVector4D *v #define setUniformGenericMatrixArray(func,colfunc,location,values,count,type,cols,rows) \ if (location == -1 || count <= 0) \ return; \ - if (count == 1 || sizeof(type) == cols * rows * sizeof(GLfloat)) { \ + if (sizeof(type) == sizeof(GLfloat) * cols * rows) { \ + const GLfloat *data = reinterpret_cast \ + (values[0].constData()); \ if (func) \ - func(location, count, GL_FALSE, values->constData()); \ + func(location, count, GL_FALSE, data); \ else \ - colfunc(location, cols * count, values->constData()); \ + colfunc(location, count * cols, data); \ } else { \ QVarLengthArray temp(cols * rows * count); \ for (int index = 0; index < count; ++index) { \ - qMemCopy(temp.data() + cols * rows * index, \ - values[index].constData(), cols * rows * sizeof(GLfloat)); \ + for (int index2 = 0; index2 < (cols * rows); ++index2) { \ + temp.data()[cols * rows * index + index2] = \ + values[index].constData()[index2]; \ + } \ } \ if (func) \ func(location, count, GL_FALSE, temp.constData()); \ @@ -2854,13 +2837,17 @@ void QGLShaderProgram::setUniformValueArray(const char *name, const QVector4D *v #define setUniformGenericMatrixArray(func,colfunc,location,values,count,type,cols,rows) \ if (location == -1 || count <= 0) \ return; \ - if (count == 1 || sizeof(type) == cols * rows * sizeof(GLfloat)) { \ - colfunc(location, cols * count, values->constData()); \ + if (sizeof(type) == sizeof(GLfloat) * cols * rows) { \ + const GLfloat *data = reinterpret_cast \ + (values[0].constData()); \ + colfunc(location, count * cols, data); \ } else { \ QVarLengthArray temp(cols * rows * count); \ for (int index = 0; index < count; ++index) { \ - qMemCopy(temp.data() + cols * rows * index, \ - values[index].constData(), cols * rows * sizeof(GLfloat)); \ + for (int index2 = 0; index2 < (cols * rows); ++index2) { \ + temp.data()[cols * rows * index + index2] = \ + values[index].constData()[index2]; \ + } \ } \ colfunc(location, count * cols, temp.constData()); \ } diff --git a/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp b/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp index fd5ef3e..6a7e625 100644 --- a/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp +++ b/tests/auto/qmatrixnxn/tst_qmatrixnxn.cpp @@ -328,7 +328,7 @@ void tst_QMatrixNxN::setMatrix(QMatrix4x3& m, const qreal *values) // the internal data() array. void tst_QMatrixNxN::setMatrixDirect(QMatrix2x2& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 2; ++row) { for (int col = 0; col < 2; ++col) { data[row + col * 2] = values[row * 2 + col]; @@ -337,7 +337,7 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix2x2& m, const qreal *values) } void tst_QMatrixNxN::setMatrixDirect(QMatrix3x3& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 3; ++col) { data[row + col * 3] = values[row * 3 + col]; @@ -346,7 +346,7 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix3x3& m, const qreal *values) } void tst_QMatrixNxN::setMatrixDirect(QMatrix4x4& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 4; ++row) { for (int col = 0; col < 4; ++col) { data[row + col * 4] = values[row * 4 + col]; @@ -355,7 +355,7 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix4x4& m, const qreal *values) } void tst_QMatrixNxN::setMatrixDirect(QMatrix4x3& m, const qreal *values) { - float *data = m.data(); + qreal *data = m.data(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 4; ++col) { data[row + col * 3] = values[row * 4 + col]; @@ -363,55 +363,42 @@ void tst_QMatrixNxN::setMatrixDirect(QMatrix4x3& m, const qreal *values) } } -// qFuzzyCompare isn't always "fuzzy" enough to handle conversion -// between float, double, and qreal. So create "fuzzier" compares. -static bool fuzzyCompare(float x, float y, qreal epsilon = 0.001) +// QVector2/3/4D use float internally, which can sometimes lead +// to precision issues when converting to and from qreal during +// operations involving QMatrix4x4. This fuzzy compare is slightly +// "fuzzier" than the default qFuzzyCompare for qreal to compensate. +static bool fuzzyCompare(qreal x, qreal y) { - float diff = x - y; - if (diff < 0.0f) - diff = -diff; - return (diff < epsilon); + return qFuzzyIsNull((float)(x - y)); } -static bool fuzzyCompare(const QVector3D &v1, const QVector3D &v2, qreal epsilon = 0.001) +static bool fuzzyCompare(const QVector3D &v1, const QVector3D &v2) { - if (!fuzzyCompare(v1.x(), v2.x(), epsilon)) + if (!fuzzyCompare(v1.x(), v2.x())) return false; - if (!fuzzyCompare(v1.y(), v2.y(), epsilon)) + if (!fuzzyCompare(v1.y(), v2.y())) return false; - if (!fuzzyCompare(v1.z(), v2.z(), epsilon)) + if (!fuzzyCompare(v1.z(), v2.z())) return false; return true; } -static bool matrixFuzzyCompare(const QMatrix4x4 &m1, const QMatrix4x4 &m2) -{ - bool ret = true; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - ret = ret && fuzzyCompare(m1(i, j), m2(i, j)); - } - } - - return ret; -} - // Determine if a matrix is the same as a specified array of values. // The values are assumed to be specified in row-major order. bool tst_QMatrixNxN::isSame(const QMatrix2x2& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 2; ++row) { for (int col = 0; col < 2; ++col) { // Check the values using the operator() function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 2 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 2 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 2 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 2 + row]), (float)(values[row * 2 + col]))) { + if (!fuzzyCompare(mv[col * 2 + row], values[row * 2 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 2 + row] << "expected =" << values[row * 2 + col]; return false; } @@ -421,18 +408,18 @@ bool tst_QMatrixNxN::isSame(const QMatrix2x2& m, const qreal *values) } bool tst_QMatrixNxN::isSame(const QMatrix3x3& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 3; ++col) { // Check the values using the operator() access function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 3 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 3 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 3 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 3 + row]), (float)(values[row * 3 + col]))) { + if (!fuzzyCompare(mv[col * 3 + row], values[row * 3 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 3 + row] << "expected =" << values[row * 3 + col]; return false; } @@ -442,18 +429,18 @@ bool tst_QMatrixNxN::isSame(const QMatrix3x3& m, const qreal *values) } bool tst_QMatrixNxN::isSame(const QMatrix4x4& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 4; ++row) { for (int col = 0; col < 4; ++col) { // Check the values using the operator() access function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 4 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 4 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 4 + row]), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(mv[col * 4 + row], values[row * 4 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 4 + row] << "expected =" << values[row * 4 + col]; return false; } @@ -463,18 +450,18 @@ bool tst_QMatrixNxN::isSame(const QMatrix4x4& m, const qreal *values) } bool tst_QMatrixNxN::isSame(const QMatrix4x3& m, const qreal *values) { - const float *mv = m.constData(); + const qreal *mv = m.constData(); for (int row = 0; row < 3; ++row) { for (int col = 0; col < 4; ++col) { // Check the values using the operator() access function. - if (!fuzzyCompare((float)(m(row, col)), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(m(row, col), values[row * 4 + col])) { qDebug() << "floating-point failure at" << row << col << "actual =" << m(row, col) << "expected =" << values[row * 4 + col]; return false; } // Check the values using direct access, which verifies that the values // are stored internally in column-major order. - if (!fuzzyCompare((float)(mv[col * 3 + row]), (float)(values[row * 4 + col]))) { + if (!fuzzyCompare(mv[col * 3 + row], values[row * 4 + col])) { qDebug() << "column floating-point failure at" << row << col << "actual =" << mv[col * 3 + row] << "expected =" << values[row * 4 + col]; return false; } @@ -533,7 +520,7 @@ void tst_QMatrixNxN::create2x2() qreal vals[4]; m6.toValueArray(vals); for (int index = 0; index < 4; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues2[index])); + QCOMPARE(vals[index], uniqueValues2[index]); } // Test the creation of QMatrix3x3 objects in various ways: @@ -568,7 +555,7 @@ void tst_QMatrixNxN::create3x3() qreal vals[9]; m6.toValueArray(vals); for (int index = 0; index < 9; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues3[index])); + QCOMPARE(vals[index], uniqueValues3[index]); } // Test the creation of QMatrix4x4 objects in various ways: @@ -603,7 +590,7 @@ void tst_QMatrixNxN::create4x4() qreal vals[16]; m6.toValueArray(vals); for (int index = 0; index < 16; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues4[index])); + QCOMPARE(vals[index], uniqueValues4[index]); QMatrix4x4 m8 (uniqueValues4[0], uniqueValues4[1], uniqueValues4[2], uniqueValues4[3], @@ -645,7 +632,7 @@ void tst_QMatrixNxN::create4x3() qreal vals[12]; m6.toValueArray(vals); for (int index = 0; index < 12; ++index) - QCOMPARE((float)(vals[index]), (float)(uniqueValues4x3[index])); + QCOMPARE(vals[index], uniqueValues4x3[index]); } // Test isIdentity() for 2x2 matrices. @@ -1303,7 +1290,7 @@ void tst_QMatrixNxN::multiply4x3() QMatrix4x3 m1((const qreal *)m1Values); QMatrix3x4 m2((const qreal *)m2Values); - QGenericMatrix<3, 3, qreal, float> m4; + QGenericMatrix<3, 3, qreal> m4; m4 = m1 * m2; qreal values[9]; m4.toValueArray(values); @@ -1882,7 +1869,7 @@ void tst_QMatrixNxN::inverted4x4() Matrix4 m1alt; memcpy(m1alt.v, (const qreal *)m1Values, sizeof(m1alt.v)); - QCOMPARE((float)(m1.determinant()), (float)(m4Determinant(m1alt))); + QCOMPARE(m1.determinant(), m4Determinant(m1alt)); QMatrix4x4 m2; bool inv; @@ -1917,7 +1904,7 @@ void tst_QMatrixNxN::inverted4x4() void tst_QMatrixNxN::orthonormalInverse4x4() { QMatrix4x4 m1; - QVERIFY(matrixFuzzyCompare(m1.inverted(), m1)); + QVERIFY(qFuzzyCompare(m1.inverted(), m1)); QMatrix4x4 m2; m2.rotate(45.0, 1.0, 0.0, 0.0); @@ -1930,14 +1917,14 @@ void tst_QMatrixNxN::orthonormalInverse4x4() QMatrix4x4 m3 = m2; m3.inferSpecialType(); bool invertible; - QVERIFY(matrixFuzzyCompare(m2.inverted(&invertible), m3.inverted())); + QVERIFY(qFuzzyCompare(m2.inverted(&invertible), m3.inverted())); QVERIFY(invertible); QMatrix4x4 m4; m4.rotate(45.0, 0.0, 1.0, 0.0); QMatrix4x4 m5 = m4; m5.inferSpecialType(); - QVERIFY(matrixFuzzyCompare(m4.inverted(), m5.inverted())); + QVERIFY(qFuzzyCompare(m4.inverted(), m5.inverted())); QMatrix4x4 m6; m1.rotate(88, 0.0, 0.0, 1.0); @@ -1945,7 +1932,7 @@ void tst_QMatrixNxN::orthonormalInverse4x4() m1.rotate(25, 1.0, 0.0, 0.0); QMatrix4x4 m7 = m6; m7.inferSpecialType(); - QVERIFY(matrixFuzzyCompare(m6.inverted(), m7.inverted())); + QVERIFY(qFuzzyCompare(m6.inverted(), m7.inverted())); } // Test the generation and use of 4x4 scale matrices. @@ -2345,7 +2332,7 @@ void tst_QMatrixNxN::rotate4x4() QMatrix4x4 m3(uniqueValues4); QMatrix4x4 m4(m3); m4.rotate(angle, x, y, z); - QVERIFY(matrixFuzzyCompare(m4, m3 * m1)); + QVERIFY(qFuzzyCompare(m4, m3 * m1)); // Null vectors don't make sense for quaternion rotations. if (x != 0 || y != 0 || z != 0) { @@ -2417,8 +2404,8 @@ void tst_QMatrixNxN::rotate4x4() QPointF p3(2.0f, 3.0f); QPointF p4 = m1 * p3; - QVERIFY(fuzzyCompare((float)(p4.x()), p1x)); - QVERIFY(fuzzyCompare((float)(p4.y()), p1y)); + QVERIFY(fuzzyCompare(p4.x(), p1x)); + QVERIFY(fuzzyCompare(p4.y(), p1y)); if (x != 0 || y != 0 || z != 0) { QQuaternion q = QQuaternion::fromAxisAndAngle(QVector3D(x, y, z), angle); @@ -2911,14 +2898,12 @@ void tst_QMatrixNxN::extractAxisRotation() m.extractAxisRotation(extractedAngle, extractedAxis); - qreal epsilon = 0.001; - if (angle > 180) { - QVERIFY(fuzzyCompare(360.0f - angle, extractedAngle, epsilon)); - QVERIFY(fuzzyCompare(extractedAxis, -origAxis, epsilon)); + QVERIFY(fuzzyCompare(360.0f - angle, extractedAngle)); + QVERIFY(fuzzyCompare(extractedAxis, -origAxis)); } else { - QVERIFY(fuzzyCompare(angle, extractedAngle, epsilon)); - QVERIFY(fuzzyCompare(extractedAxis, origAxis, epsilon)); + QVERIFY(fuzzyCompare(angle, extractedAngle)); + QVERIFY(fuzzyCompare(extractedAxis, origAxis)); } } @@ -2959,11 +2944,9 @@ void tst_QMatrixNxN::extractTranslation() QVector3D vec = rotation.extractTranslation(); - qreal epsilon = 0.001; - - QVERIFY(fuzzyCompare(vec.x(), x, epsilon)); - QVERIFY(fuzzyCompare(vec.y(), y, epsilon)); - QVERIFY(fuzzyCompare(vec.z(), z, epsilon)); + QVERIFY(fuzzyCompare(vec.x(), x)); + QVERIFY(fuzzyCompare(vec.y(), y)); + QVERIFY(fuzzyCompare(vec.z(), z)); QMatrix4x4 lookAt; QVector3D eye(1.5f, -2.5f, 2.5f); @@ -2973,9 +2956,9 @@ void tst_QMatrixNxN::extractTranslation() QVector3D extEye = lookAt.extractTranslation(); - QVERIFY(fuzzyCompare(eye.x(), -extEye.x(), epsilon)); - QVERIFY(fuzzyCompare(eye.y(), -extEye.y(), epsilon)); - QVERIFY(fuzzyCompare(eye.z(), -extEye.z(), epsilon)); + QVERIFY(fuzzyCompare(eye.x(), -extEye.x())); + QVERIFY(fuzzyCompare(eye.y(), -extEye.y())); + QVERIFY(fuzzyCompare(eye.z(), -extEye.z())); } // Copy of "flagBits" in qmatrix4x4.h. @@ -2990,7 +2973,7 @@ enum { // Structure that allows direct access to "flagBits" for testing. struct Matrix4x4 { - float m[4][4]; + qreal m[4][4]; int flagBits; }; @@ -3134,8 +3117,8 @@ void tst_QMatrixNxN::convertQMatrix() QMatrix4x4 m6(m5); QPointF p6 = m6 * QPointF(100.0, 150.0); - QVERIFY(fuzzyCompare(p5.x(), p6.x(), 0.005)); - QVERIFY(fuzzyCompare(p5.y(), p6.y(), 0.005)); + QVERIFY(fuzzyCompare(p5.x(), p6.x())); + QVERIFY(fuzzyCompare(p5.y(), p6.y())); QMatrix m7 = m6.toAffine(); QVERIFY(fuzzyCompare(m5.m11(), m7.m11())); @@ -3181,8 +3164,8 @@ void tst_QMatrixNxN::convertQTransform() QMatrix4x4 m6(m5); QPointF p6 = m6 * QPointF(100.0, 150.0); - QVERIFY(fuzzyCompare(p5.x(), p6.x(), 0.005)); - QVERIFY(fuzzyCompare(p5.y(), p6.y(), 0.005)); + QVERIFY(fuzzyCompare(p5.x(), p6.x())); + QVERIFY(fuzzyCompare(p5.y(), p6.y())); QTransform m7 = m6.toTransform(); QVERIFY(fuzzyCompare(m5.m11(), m7.m11())); diff --git a/tests/auto/qquaternion/tst_qquaternion.cpp b/tests/auto/qquaternion/tst_qquaternion.cpp index 24427c3..e3c4cd6 100644 --- a/tests/auto/qquaternion/tst_qquaternion.cpp +++ b/tests/auto/qquaternion/tst_qquaternion.cpp @@ -98,14 +98,11 @@ private slots: void metaTypes(); }; -// qFuzzyCompare isn't always "fuzzy" enough to handle conversion -// between float, double, and qreal. So create "fuzzier" compares. -static bool fuzzyCompare(float x, float y) -{ - float diff = x - y; - if (diff < 0.0f) - diff = -diff; - return (diff < 0.001); +// QVector3D uses float internally, which can lead to some precision +// issues when using it with the qreal-based QQuaternion. +static bool fuzzyCompare(qreal x, qreal y) +{ + return qFuzzyIsNull(float(x - y)); } // Test the creation of QQuaternion objects in various ways: @@ -250,8 +247,8 @@ void tst_QQuaternion::length() QFETCH(qreal, len); QQuaternion v(w, x, y, z); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y + z * z + w * w)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y + z * z + w * w); } // Test the unit vector conversion for quaternions. @@ -273,11 +270,11 @@ void tst_QQuaternion::normalized() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); - QCOMPARE((float)(u.z() * len), (float)(v.z())); - QCOMPARE((float)(u.scalar() * len), (float)(v.scalar())); + QCOMPARE(u.length(), qreal(1.0f)); + QCOMPARE(u.x() * len, v.x()); + QCOMPARE(u.y() * len, v.y()); + QCOMPARE(u.z() * len, v.z()); + QCOMPARE(u.scalar() * len, v.scalar()); } // Test the unit vector conversion for quaternions. @@ -299,7 +296,7 @@ void tst_QQuaternion::normalize() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QCOMPARE(v.length(), qreal(1.0f)); } // Test the comparison operators for quaternions. diff --git a/tests/auto/qvectornd/tst_qvectornd.cpp b/tests/auto/qvectornd/tst_qvectornd.cpp index 243b172..75c2eb5 100644 --- a/tests/auto/qvectornd/tst_qvectornd.cpp +++ b/tests/auto/qvectornd/tst_qvectornd.cpp @@ -144,14 +144,13 @@ private slots: void metaTypes(); }; -// qFuzzyCompare isn't always "fuzzy" enough to handle conversion -// between float, double, and qreal. So create "fuzzier" compares. -static bool fuzzyCompare(float x, float y) +// QVector2/3/4D use float internally, which can sometimes lead +// to precision issues when converting to and from qreal. +// This fuzzy compare is slightly "fuzzier" than the default +// qFuzzyCompare for qreal to compensate. +static bool fuzzyCompare(qreal x, qreal y) { - float diff = x - y; - if (diff < 0.0f) - diff = -diff; - return (diff < 0.001); + return qFuzzyIsNull((float)(x - y)); } // Test the creation of QVector2D objects in various ways: @@ -577,8 +576,8 @@ void tst_QVector::length2() QFETCH(qreal, len); QVector2D v(x, y); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y); } // Test vector length computation for 3D vectors. @@ -606,8 +605,8 @@ void tst_QVector::length3() QFETCH(qreal, len); QVector3D v(x, y, z); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y + z * z)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y + z * z); } // Test vector length computation for 4D vectors. @@ -639,8 +638,8 @@ void tst_QVector::length4() QFETCH(qreal, len); QVector4D v(x, y, z, w); - QCOMPARE((float)(v.length()), (float)len); - QCOMPARE((float)(v.lengthSquared()), (float)(x * x + y * y + z * z + w * w)); + QCOMPARE(v.length(), len); + QCOMPARE(v.lengthSquared(), x * x + y * y + z * z + w * w); } // Test the unit vector conversion for 2D vectors. @@ -660,9 +659,9 @@ void tst_QVector::normalized2() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); + QVERIFY(fuzzyCompare(u.length(), qreal(1.0f))); + QVERIFY(fuzzyCompare(u.x() * len, v.x())); + QVERIFY(fuzzyCompare(u.y() * len, v.y())); } // Test the unit vector conversion for 3D vectors. @@ -683,10 +682,10 @@ void tst_QVector::normalized3() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); - QCOMPARE((float)(u.z() * len), (float)(v.z())); + QVERIFY(fuzzyCompare(u.length(), qreal(1.0f))); + QVERIFY(fuzzyCompare(u.x() * len, v.x())); + QVERIFY(fuzzyCompare(u.y() * len, v.y())); + QVERIFY(fuzzyCompare(u.z() * len, v.z())); } // Test the unit vector conversion for 4D vectors. @@ -708,11 +707,11 @@ void tst_QVector::normalized4() if (v.isNull()) QVERIFY(u.isNull()); else - QCOMPARE((float)(u.length()), (float)1.0f); - QCOMPARE((float)(u.x() * len), (float)(v.x())); - QCOMPARE((float)(u.y() * len), (float)(v.y())); - QCOMPARE((float)(u.z() * len), (float)(v.z())); - QCOMPARE((float)(u.w() * len), (float)(v.w())); + QVERIFY(fuzzyCompare(u.length(), qreal(1.0f))); + QVERIFY(fuzzyCompare(u.x() * len, v.x())); + QVERIFY(fuzzyCompare(u.y() * len, v.y())); + QVERIFY(fuzzyCompare(u.z() * len, v.z())); + QVERIFY(fuzzyCompare(u.w() * len, v.w())); } // Test the unit vector conversion for 2D vectors. @@ -732,7 +731,7 @@ void tst_QVector::normalize2() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QVERIFY(fuzzyCompare(v.length(), qreal(1.0f))); } // Test the unit vector conversion for 3D vectors. @@ -753,7 +752,7 @@ void tst_QVector::normalize3() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QVERIFY(fuzzyCompare(v.length(), qreal(1.0f))); } // Test the unit vector conversion for 4D vectors. @@ -775,7 +774,7 @@ void tst_QVector::normalize4() if (isNull) QVERIFY(v.isNull()); else - QCOMPARE((float)(v.length()), (float)1.0f); + QVERIFY(fuzzyCompare(v.length(), qreal(1.0f))); } // Test the comparison operators for 2D vectors. diff --git a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp b/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp index b4c8202..c72bc27 100644 --- a/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp +++ b/tests/benchmarks/qmatrix4x4/tst_qmatrix4x4.cpp @@ -171,9 +171,9 @@ void tst_QMatrix4x4::multiplyDirect() QMatrix4x4 m3; - const float *m1data = m1.constData(); - const float *m2data = m2.constData(); - float *m3data = m3.data(); + const qreal *m1data = m1.constData(); + const qreal *m2data = m2.constData(); + qreal *m3data = m3.data(); QBENCHMARK { for (int row = 0; row < 4; ++row) { @@ -266,9 +266,9 @@ void tst_QMatrix4x4::mapVectorDirect() { QFETCH(QMatrix4x4, m1); - const float *m1data = m1.constData(); - float v[4] = {10.5f, -2.0f, 3.0f, 1.0f}; - float result[4]; + const qreal *m1data = m1.constData(); + qreal v[4] = {10.5f, -2.0f, 3.0f, 1.0f}; + qreal result[4]; QBENCHMARK { for (int row = 0; row < 4; ++row) { -- cgit v0.12 From d2bb4091aee12af369d9f45395c45e8ef3aef20f Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 4 Sep 2009 17:22:44 +1000 Subject: Update license headers Reviewed-by: Trust Me --- bin/createpackage.bat | 43 +++++++++++++++++++- bin/createpackage.pl | 46 ++++++++++++++++++++-- bin/patch_capabilities.pl | 45 +++++++++++++++++++-- doc/src/examples/videographicsitem.qdoc | 2 +- doc/src/examples/videowidget.qdoc | 2 +- doc/src/platforms/platform-notes-rtos.qdoc | 41 +++++++++++++++++++ doc/src/snippets/code/doc_src_qtmultimedia.qdoc | 41 +++++++++++++++++++ .../snippets/code/doc_src_s60-introduction.qdoc | 43 +++++++++++++++++++- src/gui/widgets/qmenu_symbian.cpp | 1 + .../testdata/recursivescan/sub/finddialog.cpp | 7 ++++ tests/auto/network-settings.h | 3 ++ tests/benchmarks/qfile/main.cpp | 6 +-- tests/manual/gestures/pinch/main.cpp | 26 ++++++------ tests/manual/gestures/pinch/pinchwidget.cpp | 26 ++++++------ tests/manual/gestures/pinch/pinchwidget.h | 26 ++++++------ tests/manual/gestures/twopanwidgets/main.cpp | 26 ++++++------ tools/xmlpatternsvalidator/main.h | 20 +++++----- 17 files changed, 325 insertions(+), 79 deletions(-) diff --git a/bin/createpackage.bat b/bin/createpackage.bat index b5ede18..87d094f 100644 --- a/bin/createpackage.bat +++ b/bin/createpackage.bat @@ -1,3 +1,44 @@ +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +:: Contact: Nokia Corporation (qt-info@nokia.com) +:: +:: This file is part of the test suite of the Qt Toolkit. +:: +:: $QT_BEGIN_LICENSE:LGPL$ +:: No Commercial Usage +:: This file contains pre-release code and may not be distributed. +:: You may use this file in accordance with the terms and conditions +:: contained in the Technology Preview License Agreement accompanying +:: this package. +:: +:: GNU Lesser General Public License Usage +:: Alternatively, this file may be used under the terms of the GNU Lesser +:: General Public License version 2.1 as published by the Free Software +:: Foundation and appearing in the file LICENSE.LGPL included in the +:: packaging of this file. Please review the following information to +:: ensure the GNU Lesser General Public License version 2.1 requirements +:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +:: +:: In addition, as a special exception, Nokia gives you certain +:: additional rights. These rights are described in the Nokia Qt LGPL +:: Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +:: package. +:: +:: If you have questions regarding the use of this file, please contact +:: Nokia at qt-info@nokia.com. +:: +:: +:: +:: +:: +:: +:: +:: +:: $QT_END_LICENSE$ +:: +::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + @echo off set scriptpath=%~dp0 -perl %scriptpath%createpackage.pl %* \ No newline at end of file +perl %scriptpath%createpackage.pl %* diff --git a/bin/createpackage.pl b/bin/createpackage.pl index a180864..2e31544 100644 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -1,11 +1,49 @@ -#!\usr\bin\perl +#!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the S60 port of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + ############################################################################################ # # Convenience script for creating signed packages you can install on your phone. # -# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -# Contact: Qt Software Information (qt-info@nokia.com) -# ############################################################################################ use strict; diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index cf8353e..8140207 100644 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -1,10 +1,49 @@ +#!/usr/bin/perl +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the S60 port of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# + ####################################################################### # # A script for setting binary capabilities based on .pkg file contents. # -# Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). -# Contact: Nokia Corporation (qt-info@nokia.com) -# ####################################################################### sub Usage() { diff --git a/doc/src/examples/videographicsitem.qdoc b/doc/src/examples/videographicsitem.qdoc index ed420c0..796704c 100644 --- a/doc/src/examples/videographicsitem.qdoc +++ b/doc/src/examples/videographicsitem.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation of the Qt Toolkit. ** diff --git a/doc/src/examples/videowidget.qdoc b/doc/src/examples/videowidget.qdoc index ea0b495..d853fa8 100644 --- a/doc/src/examples/videowidget.qdoc +++ b/doc/src/examples/videowidget.qdoc @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation of the Qt Toolkit. ** diff --git a/doc/src/platforms/platform-notes-rtos.qdoc b/doc/src/platforms/platform-notes-rtos.qdoc index 4fef2f5..8d79a8c 100644 --- a/doc/src/platforms/platform-notes-rtos.qdoc +++ b/doc/src/platforms/platform-notes-rtos.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + /*! \page platform-notes-vxworks.html \title Platform Notes - VxWorks diff --git a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc b/doc/src/snippets/code/doc_src_qtmultimedia.qdoc index 87a03a4..97b3232 100644 --- a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc +++ b/doc/src/snippets/code/doc_src_qtmultimedia.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] QT += multimedia //! [0] diff --git a/doc/src/snippets/code/doc_src_s60-introduction.qdoc b/doc/src/snippets/code/doc_src_s60-introduction.qdoc index 09ea359..8702b78 100644 --- a/doc/src/snippets/code/doc_src_s60-introduction.qdoc +++ b/doc/src/snippets/code/doc_src_s60-introduction.qdoc @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + //! [0] qmake //! [0] @@ -25,4 +66,4 @@ //! [5] set QT_SIS_OPTIONS=-i make sis -//! [5] \ No newline at end of file +//! [5] diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 7ae799c..c5953af 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -3,6 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** +** This file is part of the S60 port of the Qt toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp index 925a776..462fcbb 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp @@ -1,6 +1,10 @@ +/**************************************************************************** +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. @@ -32,6 +36,9 @@ ** ** ** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "finddialog.h" #include "mainwindow.h" #include "tabbedbrowser.h" diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 84f1241..d1c179e 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -1,4 +1,6 @@ /**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the test suite of the Qt Toolkit. @@ -36,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include #ifdef QT_NETWORK_LIB #include diff --git a/tests/benchmarks/qfile/main.cpp b/tests/benchmarks/qfile/main.cpp index 82e6562..376412c 100644 --- a/tests/benchmarks/qfile/main.cpp +++ b/tests/benchmarks/qfile/main.cpp @@ -3,11 +3,6 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -****************************************************************************/ - -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ @@ -43,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + #include #include #include diff --git a/tests/manual/gestures/pinch/main.cpp b/tests/manual/gestures/pinch/main.cpp index 0e5b928..26f32ec 100644 --- a/tests/manual/gestures/pinch/main.cpp +++ b/tests/manual/gestures/pinch/main.cpp @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this ** package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/manual/gestures/pinch/pinchwidget.cpp b/tests/manual/gestures/pinch/pinchwidget.cpp index cc16443..1a2fe47 100644 --- a/tests/manual/gestures/pinch/pinchwidget.cpp +++ b/tests/manual/gestures/pinch/pinchwidget.cpp @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this ** package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/manual/gestures/pinch/pinchwidget.h b/tests/manual/gestures/pinch/pinchwidget.h index a76e287..c99a6d5 100644 --- a/tests/manual/gestures/pinch/pinchwidget.h +++ b/tests/manual/gestures/pinch/pinchwidget.h @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this ** package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tests/manual/gestures/twopanwidgets/main.cpp b/tests/manual/gestures/twopanwidgets/main.cpp index 7750d1d..3e73f93 100644 --- a/tests/manual/gestures/twopanwidgets/main.cpp +++ b/tests/manual/gestures/twopanwidgets/main.cpp @@ -9,8 +9,8 @@ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions -** contained in the either Technology Preview License Agreement or the -** Beta Release License Agreement. +** contained in the Technology Preview License Agreement accompanying +** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -21,20 +21,20 @@ ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this ** package. ** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** ** -** If you are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/tools/xmlpatternsvalidator/main.h b/tools/xmlpatternsvalidator/main.h index a884f11..9c7a2d6 100644 --- a/tools/xmlpatternsvalidator/main.h +++ b/tools/xmlpatternsvalidator/main.h @@ -1,10 +1,11 @@ /**************************************************************************** - ** - ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - ** Contact: Nokia Corporation (qt-info@nokia.com) - ** - ** This file is part of the Patternist project on Qt Labs. * ** - ** $QT_BEGIN_LICENSE:LGPL$ +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Patternist project on Qt Labs. +** +** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions @@ -35,11 +36,8 @@ ** ** ** $QT_END_LICENSE$ - ** - ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - ** - ****************************************************************************/ +** +****************************************************************************/ // // W A R N I N G -- cgit v0.12 From f5a66d49fee5b9f910b759831dd4762076b3a9d3 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 4 Sep 2009 17:40:50 +1000 Subject: Fix license headers. Reviewed-by: Trust Me --- demos/embedded/fluidlauncher/pictureflow.cpp | 4 ---- demos/embedded/fluidlauncher/pictureflow.h | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/demos/embedded/fluidlauncher/pictureflow.cpp b/demos/embedded/fluidlauncher/pictureflow.cpp index 9eeaa26..293ef99 100644 --- a/demos/embedded/fluidlauncher/pictureflow.cpp +++ b/demos/embedded/fluidlauncher/pictureflow.cpp @@ -3,10 +3,6 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the QtGui module of the Qt Toolkit. -** -** This is a version of the Pictureflow animated image show widget modified by Nokia. -** ** This file is part of the ActiveQt framework of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ diff --git a/demos/embedded/fluidlauncher/pictureflow.h b/demos/embedded/fluidlauncher/pictureflow.h index 7ae2a88..8fc145c 100644 --- a/demos/embedded/fluidlauncher/pictureflow.h +++ b/demos/embedded/fluidlauncher/pictureflow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This is a version of the Pictureflow animated image show widget modified by Nokia. +** This file is part of the ActiveQt framework of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: -- cgit v0.12 From d22b55d3159c001dc6b37422cefbec6775996494 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 4 Sep 2009 08:30:02 +0200 Subject: Fixed clipping of native style elements when raster is used on mac Reviewed-by: Trond --- src/gui/painting/qpaintengine_mac.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp index 40ab95e..74fc793 100644 --- a/src/gui/painting/qpaintengine_mac.cpp +++ b/src/gui/painting/qpaintengine_mac.cpp @@ -121,11 +121,15 @@ QMacCGContext::QMacCGContext(QPainter *p) if (devType == QInternal::Widget) { QRegion clip = p->paintEngine()->systemClip(); + QTransform native = p->deviceTransform(); + QTransform logical = p->combinedTransform(); if (p->hasClipping()) { + QRegion r = p->clipRegion(); + r.translate(native.dx() - logical.dx(), native.dy() - logical.dy()); if (clip.isEmpty()) - clip = p->clipRegion(); + clip = r; else - clip &= p->clipRegion(); + clip &= r; } qt_mac_clip_cg(context, clip, 0); -- cgit v0.12 From bd07aa3419be10cffee2d9eba359dd25fbdb11f2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 4 Sep 2009 10:00:30 +0200 Subject: Fix QDialog test compilation on Mac moc on Mac define itself as GCC, but does not define the __EXCEPTIONS macro. It then defined QT_NO_EXCEPTIONS and did not generate the moc output for some classes, resulting in link errors later. Reviewed-by: Gabi --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index d279891..a2c532f 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1364,7 +1364,7 @@ inline void qt_noop() {} #ifdef QT_BOOTSTRAPPED # define QT_NO_EXCEPTIONS #endif -#if defined(Q_CC_GNU) && !defined (__EXCEPTIONS) +#if defined(Q_CC_GNU) && !defined (__EXCEPTIONS) && !defined(Q_MOC_RUN) # define QT_NO_EXCEPTIONS #endif -- cgit v0.12 From 807d129265b05e0f5e575e126e97078d96b16242 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 4 Sep 2009 11:12:28 +0300 Subject: Build break fixed: Added missing include to sqt60main_mcrt0.cpp header was missing from sqt60main_mcrt0.cpp, causing Symbian builds to break. Reviewed-by: axis --- src/s60main/qts60main_mcrt0.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/s60main/qts60main_mcrt0.cpp b/src/s60main/qts60main_mcrt0.cpp index 4a30380..1040652 100644 --- a/src/s60main/qts60main_mcrt0.cpp +++ b/src/s60main/qts60main_mcrt0.cpp @@ -49,6 +49,7 @@ #include #include +#include #include "estlib.h" // Needed for QT_TRYCATCH_LEAVING. -- cgit v0.12 From 2e1653563a801909788c912ed8071afe8bf4ba05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 4 Sep 2009 10:10:54 +0200 Subject: Fixed autotest failure in qwidget on X11 with Oxygen style. Oxygen draws a fancy background gradient etc so it's not suitable for this kind of pixel testing. Since we're testing the window surface and not the style just use the simple QWindowsStyle here. Reviewed-by: Gunnar Sletta --- tests/auto/qwidget/tst_qwidget.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index f638efd..b3df69d 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -5347,6 +5347,8 @@ void tst_QWidget::moveChild() QFETCH(QPoint, offset); ColorWidget parent; + // prevent custom styles + parent.setStyle(new QWindowsStyle); ColorWidget child(&parent, Qt::blue); #ifndef Q_OS_WINCE @@ -5397,6 +5399,8 @@ void tst_QWidget::moveChild() void tst_QWidget::showAndMoveChild() { QWidget parent(0, Qt::FramelessWindowHint); + // prevent custom styles + parent.setStyle(new QWindowsStyle); parent.resize(300, 300); parent.setPalette(Qt::red); parent.show(); @@ -6467,6 +6471,8 @@ void tst_QWidget::render() { QWidget window; window.resize(100, 100); + // prevent custom styles + window.setStyle(new QWindowsStyle); window.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&window); @@ -6484,6 +6490,8 @@ void tst_QWidget::render() widget.resize(200, 200); widget.setAutoFillBackground(true); widget.setPalette(Qt::red); + // prevent custom styles + widget.setStyle(new QWindowsStyle); widget.show(); #ifdef Q_WS_X11 qt_x11_wait_for_window_manager(&widget); @@ -6739,6 +6747,8 @@ void tst_QWidget::renderInvisible() void tst_QWidget::renderWithPainter() { QWidget widget; + // prevent custom styles + widget.setStyle(new QWindowsStyle); widget.show(); widget.resize(70, 50); widget.setAutoFillBackground(true); -- cgit v0.12 From 74a88ac9d72ba83965d439eddc99e478762fd524 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 4 Sep 2009 10:49:32 +0200 Subject: Generate Q_UNUSED(varName) only when varName was not used in retranslateUi(Class varName) method. Autotests for uic updated accordingly Task: 260784 RevBy: Kai Koehne --- src/tools/uic/cpp/cppwriteinitialization.cpp | 11 +++++- src/tools/uic/cpp/cppwriteinitialization.h | 1 + .../uic/baseline/Dialog_with_Buttons_Bottom.ui.h | 44 +--------------------- .../uic/baseline/Dialog_with_Buttons_Right.ui.h | 44 +--------------------- .../auto/uic/baseline/Dialog_without_Buttons.ui.h | 44 +--------------------- tests/auto/uic/baseline/Main_Window.ui.h | 44 +--------------------- tests/auto/uic/baseline/Widget.ui.h | 44 +--------------------- tests/auto/uic/baseline/addlinkdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/addtorrentform.ui.h | 44 +--------------------- tests/auto/uic/baseline/authenticationdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/backside.ui.h | 44 +--------------------- tests/auto/uic/baseline/batchtranslation.ui.h | 3 +- tests/auto/uic/baseline/bookmarkdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/bookwindow.ui.h | 44 +--------------------- tests/auto/uic/baseline/browserwidget.ui.h | 44 +--------------------- tests/auto/uic/baseline/calculator.ui.h | 44 +--------------------- tests/auto/uic/baseline/calculatorform.ui.h | 44 +--------------------- tests/auto/uic/baseline/certificateinfo.ui.h | 44 +--------------------- tests/auto/uic/baseline/chatdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/chatmainwindow.ui.h | 43 +-------------------- tests/auto/uic/baseline/chatsetnickname.ui.h | 44 +--------------------- tests/auto/uic/baseline/config.ui.h | 3 +- tests/auto/uic/baseline/connectdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/controller.ui.h | 44 +--------------------- tests/auto/uic/baseline/cookies.ui.h | 44 +--------------------- tests/auto/uic/baseline/cookiesexceptions.ui.h | 44 +--------------------- tests/auto/uic/baseline/default.ui.h | 43 +-------------------- tests/auto/uic/baseline/dialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/downloaditem.ui.h | 44 +--------------------- tests/auto/uic/baseline/downloads.ui.h | 44 +--------------------- tests/auto/uic/baseline/embeddeddialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/filespage.ui.h | 44 +--------------------- tests/auto/uic/baseline/filternamedialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/filterpage.ui.h | 44 +--------------------- tests/auto/uic/baseline/finddialog.ui.h | 3 +- tests/auto/uic/baseline/form.ui.h | 44 +--------------------- tests/auto/uic/baseline/formwindowsettings.ui.h | 3 +- tests/auto/uic/baseline/generalpage.ui.h | 44 +--------------------- tests/auto/uic/baseline/gridpanel.ui.h | 44 +--------------------- tests/auto/uic/baseline/helpdialog.ui.h | 3 +- tests/auto/uic/baseline/history.ui.h | 44 +--------------------- tests/auto/uic/baseline/identifierpage.ui.h | 44 +--------------------- tests/auto/uic/baseline/imagedialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/inputpage.ui.h | 44 +--------------------- tests/auto/uic/baseline/installdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/languagesdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/listwidgeteditor.ui.h | 3 +- tests/auto/uic/baseline/mainwindow.ui.h | 43 +-------------------- tests/auto/uic/baseline/mainwindowbase.ui.h | 2 +- tests/auto/uic/baseline/mydialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/myform.ui.h | 44 +--------------------- tests/auto/uic/baseline/newactiondialog.ui.h | 3 +- .../uic/baseline/newdynamicpropertydialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/newform.ui.h | 3 +- tests/auto/uic/baseline/orderdialog.ui.h | 3 +- tests/auto/uic/baseline/outputpage.ui.h | 44 +--------------------- tests/auto/uic/baseline/pagefold.ui.h | 43 +-------------------- tests/auto/uic/baseline/paletteeditor.ui.h | 3 +- .../uic/baseline/paletteeditoradvancedbase.ui.h | 3 +- tests/auto/uic/baseline/passworddialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/pathpage.ui.h | 44 +--------------------- tests/auto/uic/baseline/phrasebookbox.ui.h | 3 +- tests/auto/uic/baseline/plugindialog.ui.h | 3 +- tests/auto/uic/baseline/preferencesdialog.ui.h | 44 +--------------------- .../uic/baseline/previewconfigurationwidget.ui.h | 44 +--------------------- tests/auto/uic/baseline/previewdialogbase.ui.h | 44 +--------------------- tests/auto/uic/baseline/previewwidget.ui.h | 3 +- tests/auto/uic/baseline/previewwidgetbase.ui.h | 3 +- tests/auto/uic/baseline/proxy.ui.h | 44 +--------------------- tests/auto/uic/baseline/qfiledialog.ui.h | 2 +- tests/auto/uic/baseline/qpagesetupwidget.ui.h | 44 +--------------------- .../auto/uic/baseline/qprintpropertieswidget.ui.h | 44 +--------------------- tests/auto/uic/baseline/qprintsettingsoutput.ui.h | 44 +--------------------- tests/auto/uic/baseline/qprintwidget.ui.h | 44 +--------------------- tests/auto/uic/baseline/qsqlconnectiondialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/qtgradientdialog.ui.h | 3 +- tests/auto/uic/baseline/qtgradienteditor.ui.h | 9 +++-- tests/auto/uic/baseline/qtgradientview.ui.h | 44 +--------------------- tests/auto/uic/baseline/qtgradientviewdialog.ui.h | 3 +- .../auto/uic/baseline/qtresourceeditordialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/qttoolbardialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/querywidget.ui.h | 44 +--------------------- tests/auto/uic/baseline/remotecontrol.ui.h | 43 +-------------------- tests/auto/uic/baseline/saveformastemplate.ui.h | 3 +- tests/auto/uic/baseline/settings.ui.h | 44 +--------------------- tests/auto/uic/baseline/signalslotdialog.ui.h | 44 +--------------------- tests/auto/uic/baseline/sslclient.ui.h | 44 +--------------------- tests/auto/uic/baseline/sslerrors.ui.h | 44 +--------------------- tests/auto/uic/baseline/statistics.ui.h | 3 +- tests/auto/uic/baseline/stringlisteditor.ui.h | 3 +- tests/auto/uic/baseline/stylesheeteditor.ui.h | 44 +--------------------- tests/auto/uic/baseline/tabbedbrowser.ui.h | 3 +- tests/auto/uic/baseline/tablewidgeteditor.ui.h | 3 +- tests/auto/uic/baseline/tetrixwindow.ui.h | 44 +--------------------- tests/auto/uic/baseline/textfinder.ui.h | 44 +--------------------- tests/auto/uic/baseline/topicchooser.ui.h | 44 +--------------------- tests/auto/uic/baseline/translatedialog.ui.h | 3 +- tests/auto/uic/baseline/translationsettings.ui.h | 44 +--------------------- tests/auto/uic/baseline/treewidgeteditor.ui.h | 3 +- tests/auto/uic/baseline/trpreviewtool.ui.h | 2 +- tests/auto/uic/baseline/validators.ui.h | 44 +--------------------- tests/auto/uic/baseline/wateringconfigdialog.ui.h | 44 +--------------------- 102 files changed, 114 insertions(+), 3148 deletions(-) diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 8dcc4aa..197414b 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -474,6 +474,7 @@ WriteInitialization::WriteInitialization(Uic *uic, bool activateScripts) : m_dindent(m_indent + m_option.indent), m_stdsetdef(true), m_layoutMarginType(TopLevelMargin), + m_mainFormUsedInRetranslateUi(false), m_delayedOut(&m_delayedInitialization, QIODevice::WriteOnly), m_refreshOut(&m_refreshInitialization, QIODevice::WriteOnly), m_actionOut(&m_delayedActionInitialization, QIODevice::WriteOnly), @@ -569,11 +570,11 @@ void WriteInitialization::acceptUI(DomUI *node) m_output << m_option.indent << "} // setupUi\n\n"; - if (m_delayedActionInitialization.isEmpty()) { + if (!m_mainFormUsedInRetranslateUi) { m_refreshInitialization += m_indent; m_refreshInitialization += QLatin1String("Q_UNUSED("); m_refreshInitialization += varName ; - m_refreshInitialization +=QLatin1String(");\n"); + m_refreshInitialization += QLatin1String(");\n"); } m_output << m_option.indent << "void " << "retranslateUi(" << widgetClassName << " *" << varName << ")\n" @@ -1531,6 +1532,12 @@ void WriteInitialization::writeProperties(const QString &varName, o << ");\n"; if (defineC) closeIfndef(o, QLatin1String(defineC)); + + if (varName == m_mainFormVarName && &o == &m_refreshOut) { + // this is the only place (currently) where we output mainForm name to the retranslateUi(). + // Other places output merely instances of a certain class (which cannot be main form, e.g. QListWidget). + m_mainFormUsedInRetranslateUi = true; + } } } if (leftMargin != -1 || topMargin != -1 || rightMargin != -1 || bottomMargin != -1) { diff --git a/src/tools/uic/cpp/cppwriteinitialization.h b/src/tools/uic/cpp/cppwriteinitialization.h index 19e4fc7..b0564d0 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.h +++ b/src/tools/uic/cpp/cppwriteinitialization.h @@ -350,6 +350,7 @@ private: QString m_generatedClass; QString m_mainFormVarName; + bool m_mainFormUsedInRetranslateUi; QString m_delayedInitialization; QTextStream m_delayedOut; diff --git a/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h b/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h index 4b3ca7e..ecbfd30 100644 --- a/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h +++ b/tests/auto/uic/baseline/Dialog_with_Buttons_Bottom.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Dialog_with_Buttons_Bottom.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -87,7 +46,6 @@ public: void retranslateUi(QDialog *Dialog) { Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h b/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h index 9f390f6..aa42d5c 100644 --- a/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h +++ b/tests/auto/uic/baseline/Dialog_with_Buttons_Right.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Dialog_with_Buttons_Right.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -87,7 +46,6 @@ public: void retranslateUi(QDialog *Dialog) { Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h b/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h index 0ab89f8..7d876e1 100644 --- a/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h +++ b/tests/auto/uic/baseline/Dialog_without_Buttons.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Dialog_without_Buttons.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -78,7 +37,6 @@ public: void retranslateUi(QDialog *Dialog) { Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Main_Window.ui.h b/tests/auto/uic/baseline/Main_Window.ui.h index 85f1dd2..b54e4a6 100644 --- a/tests/auto/uic/baseline/Main_Window.ui.h +++ b/tests/auto/uic/baseline/Main_Window.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Main_Window.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -93,7 +52,6 @@ public: void retranslateUi(QMainWindow *MainWindow) { MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(MainWindow); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/Widget.ui.h b/tests/auto/uic/baseline/Widget.ui.h index c23cf7d..362d283 100644 --- a/tests/auto/uic/baseline/Widget.ui.h +++ b/tests/auto/uic/baseline/Widget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'Widget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -109,7 +68,6 @@ public: "Last line.", 0, QApplication::UnicodeUTF8)); groupBox->setTitle(QApplication::translate("Form", "A Group Box", 0, QApplication::UnicodeUTF8)); pushButton->setText(QApplication::translate("Form", "PushButton", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/addlinkdialog.ui.h b/tests/auto/uic/baseline/addlinkdialog.ui.h index 39b92da..230bc5d 100644 --- a/tests/auto/uic/baseline/addlinkdialog.ui.h +++ b/tests/auto/uic/baseline/addlinkdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'addlinkdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -145,7 +104,6 @@ public: AddLinkDialog->setWindowTitle(QApplication::translate("AddLinkDialog", "Insert Link", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("AddLinkDialog", "Title:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("AddLinkDialog", "URL:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(AddLinkDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/addtorrentform.ui.h b/tests/auto/uic/baseline/addtorrentform.ui.h index f477d8d..c075e8a 100644 --- a/tests/auto/uic/baseline/addtorrentform.ui.h +++ b/tests/auto/uic/baseline/addtorrentform.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'addtorrentform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -269,7 +228,6 @@ public: sizeLabel->setText(QApplication::translate("AddTorrentFile", "0", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("AddTorrentFile", "&OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("AddTorrentFile", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(AddTorrentFile); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/authenticationdialog.ui.h b/tests/auto/uic/baseline/authenticationdialog.ui.h index 0b2d06c..9f35586 100644 --- a/tests/auto/uic/baseline/authenticationdialog.ui.h +++ b/tests/auto/uic/baseline/authenticationdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'authenticationdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -154,7 +113,6 @@ public: label_3->setText(QApplication::translate("Dialog", "Password:", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("Dialog", "Site:", 0, QApplication::UnicodeUTF8)); siteDescription->setText(QApplication::translate("Dialog", "%1 at %2", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/backside.ui.h b/tests/auto/uic/baseline/backside.ui.h index af035b9..0fd710a 100644 --- a/tests/auto/uic/baseline/backside.ui.h +++ b/tests/auto/uic/baseline/backside.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'backside.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -224,7 +183,6 @@ public: ___qtreewidgetitem11->setText(0, QApplication::translate("BackSide", "QGraphicsLayoutItem", 0, QApplication::UnicodeUTF8)); treeWidget->setSortingEnabled(__sortingEnabled); - Q_UNUSED(BackSide); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/batchtranslation.ui.h b/tests/auto/uic/baseline/batchtranslation.ui.h index 26315c4..6b0051f 100644 --- a/tests/auto/uic/baseline/batchtranslation.ui.h +++ b/tests/auto/uic/baseline/batchtranslation.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'batchtranslation.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -240,7 +240,6 @@ public: label->setText(QApplication::translate("databaseTranslationDialog", "The batch translator will search through the selected phrasebooks in the order given above.", 0, QApplication::UnicodeUTF8)); runButton->setText(QApplication::translate("databaseTranslationDialog", "&Run", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("databaseTranslationDialog", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(databaseTranslationDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/bookmarkdialog.ui.h b/tests/auto/uic/baseline/bookmarkdialog.ui.h index 0a381ab..098614c 100644 --- a/tests/auto/uic/baseline/bookmarkdialog.ui.h +++ b/tests/auto/uic/baseline/bookmarkdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'bookmarkdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -199,7 +158,6 @@ public: QTreeWidgetItem *___qtreewidgetitem = bookmarkWidget->headerItem(); ___qtreewidgetitem->setText(0, QApplication::translate("BookmarkDialog", "1", 0, QApplication::UnicodeUTF8)); newFolderButton->setText(QApplication::translate("BookmarkDialog", "New Folder", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(BookmarkDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/bookwindow.ui.h b/tests/auto/uic/baseline/bookwindow.ui.h index a809330..e6c9280 100644 --- a/tests/auto/uic/baseline/bookwindow.ui.h +++ b/tests/auto/uic/baseline/bookwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'bookwindow.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -210,7 +169,6 @@ public: label_4->setText(QApplication::translate("BookWindow", "Year:", 0, QApplication::UnicodeUTF8)); yearEdit->setPrefix(QString()); label->setText(QApplication::translate("BookWindow", "Rating:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(BookWindow); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/browserwidget.ui.h b/tests/auto/uic/baseline/browserwidget.ui.h index 5c2a9d0..556d672 100644 --- a/tests/auto/uic/baseline/browserwidget.ui.h +++ b/tests/auto/uic/baseline/browserwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'browserwidget.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -210,7 +169,6 @@ public: groupBox->setTitle(QApplication::translate("Browser", "SQL Query", 0, QApplication::UnicodeUTF8)); clearButton->setText(QApplication::translate("Browser", "&Clear", 0, QApplication::UnicodeUTF8)); submitButton->setText(QApplication::translate("Browser", "&Submit", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Browser); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/calculator.ui.h b/tests/auto/uic/baseline/calculator.ui.h index f6c2070..b2cf236 100644 --- a/tests/auto/uic/baseline/calculator.ui.h +++ b/tests/auto/uic/baseline/calculator.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'calculator.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -229,7 +188,6 @@ public: powerButton->setText(QApplication::translate("Calculator", "x^2", 0, QApplication::UnicodeUTF8)); reciprocalButton->setText(QApplication::translate("Calculator", "1/x", 0, QApplication::UnicodeUTF8)); equalButton->setText(QApplication::translate("Calculator", "=", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Calculator); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/calculatorform.ui.h b/tests/auto/uic/baseline/calculatorform.ui.h index 364018e..f2cf253 100644 --- a/tests/auto/uic/baseline/calculatorform.ui.h +++ b/tests/auto/uic/baseline/calculatorform.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'calculatorform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -222,7 +181,6 @@ public: label_3_2->setText(QApplication::translate("CalculatorForm", "=", 0, QApplication::UnicodeUTF8)); label_2_2_2->setText(QApplication::translate("CalculatorForm", "Output", 0, QApplication::UnicodeUTF8)); outputWidget->setText(QApplication::translate("CalculatorForm", "0", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CalculatorForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/certificateinfo.ui.h b/tests/auto/uic/baseline/certificateinfo.ui.h index c163aed..53d54c4 100644 --- a/tests/auto/uic/baseline/certificateinfo.ui.h +++ b/tests/auto/uic/baseline/certificateinfo.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'certificateinfo.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: CertificateInfo->setWindowTitle(QApplication::translate("CertificateInfo", "Display Certificate Information", 0, QApplication::UnicodeUTF8)); groupBox->setTitle(QApplication::translate("CertificateInfo", "Certification Path", 0, QApplication::UnicodeUTF8)); groupBox_2->setTitle(QApplication::translate("CertificateInfo", "Certificate Information", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CertificateInfo); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/chatdialog.ui.h b/tests/auto/uic/baseline/chatdialog.ui.h index ed144fb..4152d36 100644 --- a/tests/auto/uic/baseline/chatdialog.ui.h +++ b/tests/auto/uic/baseline/chatdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'chatdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -144,7 +103,6 @@ public: { ChatDialog->setWindowTitle(QApplication::translate("ChatDialog", "Chat", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("ChatDialog", "Message:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ChatDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/chatmainwindow.ui.h b/tests/auto/uic/baseline/chatmainwindow.ui.h index c179220..932f1dd 100644 --- a/tests/auto/uic/baseline/chatmainwindow.ui.h +++ b/tests/auto/uic/baseline/chatmainwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'chatmainwindow.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/chatsetnickname.ui.h b/tests/auto/uic/baseline/chatsetnickname.ui.h index 6d3650d..9a52aa5 100644 --- a/tests/auto/uic/baseline/chatsetnickname.ui.h +++ b/tests/auto/uic/baseline/chatsetnickname.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'chatsetnickname.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -161,7 +120,6 @@ public: label->setText(QApplication::translate("NicknameDialog", "New nickname:", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("NicknameDialog", "OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("NicknameDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(NicknameDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/config.ui.h b/tests/auto/uic/baseline/config.ui.h index 17383f7..87a115b 100644 --- a/tests/auto/uic/baseline/config.ui.h +++ b/tests/auto/uic/baseline/config.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'config.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -760,7 +760,6 @@ public: PushButton3->setText(QApplication::translate("Config", "Set all to 1.0", 0, QApplication::UnicodeUTF8)); buttonOk->setText(QApplication::translate("Config", "&OK", 0, QApplication::UnicodeUTF8)); buttonCancel->setText(QApplication::translate("Config", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Config); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/connectdialog.ui.h b/tests/auto/uic/baseline/connectdialog.ui.h index 018be03..ceafddc 100644 --- a/tests/auto/uic/baseline/connectdialog.ui.h +++ b/tests/auto/uic/baseline/connectdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'connectdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:12 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -177,7 +136,6 @@ public: slotGroupBox->setTitle(QApplication::translate("ConnectDialog", "GroupBox", 0, QApplication::UnicodeUTF8)); editSlotsButton->setText(QApplication::translate("ConnectDialog", "Edit...", 0, QApplication::UnicodeUTF8)); showAllCheckBox->setText(QApplication::translate("ConnectDialog", "Show signals and slots inherited from QWidget", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ConnectDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/controller.ui.h b/tests/auto/uic/baseline/controller.ui.h index 7887e82..583a353 100644 --- a/tests/auto/uic/baseline/controller.ui.h +++ b/tests/auto/uic/baseline/controller.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'controller.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -126,7 +85,6 @@ public: accelerate->setText(QApplication::translate("Controller", "Accelerate", 0, QApplication::UnicodeUTF8)); right->setText(QApplication::translate("Controller", "Right", 0, QApplication::UnicodeUTF8)); left->setText(QApplication::translate("Controller", "Left", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Controller); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/cookies.ui.h b/tests/auto/uic/baseline/cookies.ui.h index cdc77f0..83946bb 100644 --- a/tests/auto/uic/baseline/cookies.ui.h +++ b/tests/auto/uic/baseline/cookies.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'cookies.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: CookiesDialog->setWindowTitle(QApplication::translate("CookiesDialog", "Cookies", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("CookiesDialog", "&Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("CookiesDialog", "Remove &All Cookies", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CookiesDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/cookiesexceptions.ui.h b/tests/auto/uic/baseline/cookiesexceptions.ui.h index 89e391c..2f4a7fb 100644 --- a/tests/auto/uic/baseline/cookiesexceptions.ui.h +++ b/tests/auto/uic/baseline/cookiesexceptions.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'cookiesexceptions.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -211,7 +170,6 @@ public: ExceptionsGroupBox->setTitle(QApplication::translate("CookiesExceptionsDialog", "Exceptions", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("CookiesExceptionsDialog", "&Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("CookiesExceptionsDialog", "Remove &All", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CookiesExceptionsDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/default.ui.h b/tests/auto/uic/baseline/default.ui.h index 99470ce..4c6b489 100644 --- a/tests/auto/uic/baseline/default.ui.h +++ b/tests/auto/uic/baseline/default.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'default.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/dialog.ui.h b/tests/auto/uic/baseline/dialog.ui.h index df10573..cd92679 100644 --- a/tests/auto/uic/baseline/dialog.ui.h +++ b/tests/auto/uic/baseline/dialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'dialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -107,7 +66,6 @@ public: loadFromFileButton->setText(QApplication::translate("Dialog", "Load Image From File...", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("Dialog", "Launch two of these dialogs. In the first, press the top button and load an image from a file. In the second, press the bottom button and display the loaded image from shared memory.", 0, QApplication::UnicodeUTF8)); loadFromSharedMemoryButton->setText(QApplication::translate("Dialog", "Display Image From Shared Memory", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/downloaditem.ui.h b/tests/auto/uic/baseline/downloaditem.ui.h index fbe7c33..d856e20 100644 --- a/tests/auto/uic/baseline/downloaditem.ui.h +++ b/tests/auto/uic/baseline/downloaditem.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'downloaditem.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -176,7 +135,6 @@ public: tryAgainButton->setText(QApplication::translate("DownloadItem", "Try Again", 0, QApplication::UnicodeUTF8)); stopButton->setText(QApplication::translate("DownloadItem", "Stop", 0, QApplication::UnicodeUTF8)); openButton->setText(QApplication::translate("DownloadItem", "Open", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(DownloadItem); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/downloads.ui.h b/tests/auto/uic/baseline/downloads.ui.h index d96de72..dd960d2 100644 --- a/tests/auto/uic/baseline/downloads.ui.h +++ b/tests/auto/uic/baseline/downloads.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'downloads.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -126,7 +85,6 @@ public: DownloadDialog->setWindowTitle(QApplication::translate("DownloadDialog", "Downloads", 0, QApplication::UnicodeUTF8)); cleanupButton->setText(QApplication::translate("DownloadDialog", "Clean up", 0, QApplication::UnicodeUTF8)); itemCount->setText(QApplication::translate("DownloadDialog", "0 Items", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(DownloadDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/embeddeddialog.ui.h b/tests/auto/uic/baseline/embeddeddialog.ui.h index 71f908d..a6cfbb1 100644 --- a/tests/auto/uic/baseline/embeddeddialog.ui.h +++ b/tests/auto/uic/baseline/embeddeddialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'embeddeddialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -150,7 +109,6 @@ public: label_2->setText(QApplication::translate("embeddedDialog", "Select Font:", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("embeddedDialog", "Style:", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("embeddedDialog", "Layout spacing:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(embeddedDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/filespage.ui.h b/tests/auto/uic/baseline/filespage.ui.h index fad4ea3..12d8554 100644 --- a/tests/auto/uic/baseline/filespage.ui.h +++ b/tests/auto/uic/baseline/filespage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'filespage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -129,7 +88,6 @@ public: fileLabel->setText(QApplication::translate("FilesPage", "Files:", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("FilesPage", "Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("FilesPage", "Remove All", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FilesPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/filternamedialog.ui.h b/tests/auto/uic/baseline/filternamedialog.ui.h index d3794f0..163a6d2 100644 --- a/tests/auto/uic/baseline/filternamedialog.ui.h +++ b/tests/auto/uic/baseline/filternamedialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'filternamedialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -123,7 +82,6 @@ public: { FilterNameDialogClass->setWindowTitle(QApplication::translate("FilterNameDialogClass", "FilterNameDialog", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("FilterNameDialogClass", "Filter Name:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FilterNameDialogClass); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/filterpage.ui.h b/tests/auto/uic/baseline/filterpage.ui.h index 10b64de..f3a2268 100644 --- a/tests/auto/uic/baseline/filterpage.ui.h +++ b/tests/auto/uic/baseline/filterpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'filterpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -155,7 +114,6 @@ public: ___qtreewidgetitem->setText(0, QApplication::translate("FilterPage", "1", 0, QApplication::UnicodeUTF8)); addButton->setText(QApplication::translate("FilterPage", "Add", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("FilterPage", "Remove", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FilterPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/finddialog.ui.h b/tests/auto/uic/baseline/finddialog.ui.h index 2c82b2f..56f810b 100644 --- a/tests/auto/uic/baseline/finddialog.ui.h +++ b/tests/auto/uic/baseline/finddialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'finddialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -242,7 +242,6 @@ public: cancel->setWhatsThis(QApplication::translate("FindDialog", "Click here to close this window.", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_WHATSTHIS cancel->setText(QApplication::translate("FindDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FindDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/form.ui.h b/tests/auto/uic/baseline/form.ui.h index 61c8b43..da2cecb 100644 --- a/tests/auto/uic/baseline/form.ui.h +++ b/tests/auto/uic/baseline/form.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'form.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -171,7 +130,6 @@ public: WorldTimeForm->setWindowTitle(QApplication::translate("WorldTimeForm", "World Time Clock", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("WorldTimeForm", "Current time:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("WorldTimeForm", "Set time zone:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(WorldTimeForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/formwindowsettings.ui.h b/tests/auto/uic/baseline/formwindowsettings.ui.h index 8836e6f..a35bd21 100644 --- a/tests/auto/uic/baseline/formwindowsettings.ui.h +++ b/tests/auto/uic/baseline/formwindowsettings.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'formwindowsettings.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -299,7 +299,6 @@ public: includeHintsGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Include Hints", 0, QApplication::UnicodeUTF8)); pixmapFunctionGroupBox->setTitle(QApplication::translate("FormWindowSettings", "&Pixmap Function", 0, QApplication::UnicodeUTF8)); gridPanel->setTitle(QApplication::translate("FormWindowSettings", "Grid", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(FormWindowSettings); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/generalpage.ui.h b/tests/auto/uic/baseline/generalpage.ui.h index e758f94..ecad723 100644 --- a/tests/auto/uic/baseline/generalpage.ui.h +++ b/tests/auto/uic/baseline/generalpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'generalpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -121,7 +80,6 @@ public: GeneralPage->setWindowTitle(QApplication::translate("GeneralPage", "Form", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("GeneralPage", "Namespace:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("GeneralPage", "Virtual Folder:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(GeneralPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/gridpanel.ui.h b/tests/auto/uic/baseline/gridpanel.ui.h index 4cdf966..e60e22d 100644 --- a/tests/auto/uic/baseline/gridpanel.ui.h +++ b/tests/auto/uic/baseline/gridpanel.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'gridpanel.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -185,7 +144,6 @@ public: m_resetButton->setText(QApplication::translate("qdesigner_internal::GridPanel", "Reset", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::GridPanel", "Grid &Y", 0, QApplication::UnicodeUTF8)); m_snapYCheckBox->setText(QApplication::translate("qdesigner_internal::GridPanel", "Snap", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__GridPanel); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/helpdialog.ui.h b/tests/auto/uic/baseline/helpdialog.ui.h index c53c08c..2b2cb45 100644 --- a/tests/auto/uic/baseline/helpdialog.ui.h +++ b/tests/auto/uic/baseline/helpdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'helpdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -383,7 +383,6 @@ public: searchButton->setText(QApplication::translate("HelpDialog", "&Search", 0, QApplication::UnicodeUTF8)); tabWidget->setTabText(tabWidget->indexOf(searchPage), QApplication::translate("HelpDialog", "&Search", 0, QApplication::UnicodeUTF8)); labelPrepare->setText(QApplication::translate("HelpDialog", "Preparing...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(HelpDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/history.ui.h b/tests/auto/uic/baseline/history.ui.h index c84dde8..8787279 100644 --- a/tests/auto/uic/baseline/history.ui.h +++ b/tests/auto/uic/baseline/history.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'history.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: HistoryDialog->setWindowTitle(QApplication::translate("HistoryDialog", "History", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("HistoryDialog", "&Remove", 0, QApplication::UnicodeUTF8)); removeAllButton->setText(QApplication::translate("HistoryDialog", "Remove &All", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(HistoryDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/identifierpage.ui.h b/tests/auto/uic/baseline/identifierpage.ui.h index 198d8e5..d7e9cee 100644 --- a/tests/auto/uic/baseline/identifierpage.ui.h +++ b/tests/auto/uic/baseline/identifierpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'identifierpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -138,7 +97,6 @@ public: identifierCheckBox->setText(QApplication::translate("IdentifierPage", "Create identifiers", 0, QApplication::UnicodeUTF8)); globalButton->setText(QApplication::translate("IdentifierPage", "Global prefix:", 0, QApplication::UnicodeUTF8)); fileNameButton->setText(QApplication::translate("IdentifierPage", "Inherit prefix from file names", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(IdentifierPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/imagedialog.ui.h b/tests/auto/uic/baseline/imagedialog.ui.h index f01430c..8011a22 100644 --- a/tests/auto/uic/baseline/imagedialog.ui.h +++ b/tests/auto/uic/baseline/imagedialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'imagedialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -249,7 +208,6 @@ public: colorDepthLabel->setText(QApplication::translate("ImageDialog", "Color depth:", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("ImageDialog", "OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("ImageDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/inputpage.ui.h b/tests/auto/uic/baseline/inputpage.ui.h index 163f47a..0ca3cce 100644 --- a/tests/auto/uic/baseline/inputpage.ui.h +++ b/tests/auto/uic/baseline/inputpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'inputpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -129,7 +88,6 @@ public: InputPage->setWindowTitle(QApplication::translate("InputPage", "Form", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("InputPage", "File name:", 0, QApplication::UnicodeUTF8)); browseButton->setText(QApplication::translate("InputPage", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(InputPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/installdialog.ui.h b/tests/auto/uic/baseline/installdialog.ui.h index 3731686..9228e08 100644 --- a/tests/auto/uic/baseline/installdialog.ui.h +++ b/tests/auto/uic/baseline/installdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'installdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -172,7 +131,6 @@ public: closeButton->setText(QApplication::translate("InstallDialog", "Close", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("InstallDialog", "Installation Path:", 0, QApplication::UnicodeUTF8)); browseButton->setText(QApplication::translate("InstallDialog", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(InstallDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/languagesdialog.ui.h b/tests/auto/uic/baseline/languagesdialog.ui.h index 9ea8b79..5062775 100644 --- a/tests/auto/uic/baseline/languagesdialog.ui.h +++ b/tests/auto/uic/baseline/languagesdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'languagesdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -184,7 +143,6 @@ public: #endif // QT_NO_TOOLTIP openFileButton->setText(QApplication::translate("LanguagesDialog", "...", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("LanguagesDialog", "OK", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(LanguagesDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/listwidgeteditor.ui.h b/tests/auto/uic/baseline/listwidgeteditor.ui.h index de4ee75..6600d41 100644 --- a/tests/auto/uic/baseline/listwidgeteditor.ui.h +++ b/tests/auto/uic/baseline/listwidgeteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'listwidgeteditor.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -211,7 +211,6 @@ public: #endif // QT_NO_TOOLTIP moveItemDownButton->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "D", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("qdesigner_internal::ListWidgetEditor", "Icon", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__ListWidgetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/mainwindow.ui.h b/tests/auto/uic/baseline/mainwindow.ui.h index b450b90..ae0a45d 100644 --- a/tests/auto/uic/baseline/mainwindow.ui.h +++ b/tests/auto/uic/baseline/mainwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'mainwindow.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:13 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/mainwindowbase.ui.h b/tests/auto/uic/baseline/mainwindowbase.ui.h index 39dc5ef..82e5dc4 100644 --- a/tests/auto/uic/baseline/mainwindowbase.ui.h +++ b/tests/auto/uic/baseline/mainwindowbase.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'mainwindowbase.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/mydialog.ui.h b/tests/auto/uic/baseline/mydialog.ui.h index b07f8f3..6114cc3 100644 --- a/tests/auto/uic/baseline/mydialog.ui.h +++ b/tests/auto/uic/baseline/mydialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'mydialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -106,7 +65,6 @@ public: aLabel->setText(QApplication::translate("MyDialog", "Join the life in the fastlane; - PCH enable your project today! -", 0, QApplication::UnicodeUTF8)); aButton->setText(QApplication::translate("MyDialog", "&Quit", 0, QApplication::UnicodeUTF8)); aButton->setShortcut(QApplication::translate("MyDialog", "Alt+Q", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(MyDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/myform.ui.h b/tests/auto/uic/baseline/myform.ui.h index d8e3496..99e1cda 100644 --- a/tests/auto/uic/baseline/myform.ui.h +++ b/tests/auto/uic/baseline/myform.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'myform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -176,7 +135,6 @@ public: radioButton_4->setText(QApplication::translate("Form", "PD&F", 0, QApplication::UnicodeUTF8)); checkBox_3->setText(QApplication::translate("Form", "Include &metadata", 0, QApplication::UnicodeUTF8)); checkBox_4->setText(QApplication::translate("Form", "Create inde&x", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/newactiondialog.ui.h b/tests/auto/uic/baseline/newactiondialog.ui.h index 5bc0caa..cb95793 100644 --- a/tests/auto/uic/baseline/newactiondialog.ui.h +++ b/tests/auto/uic/baseline/newactiondialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'newactiondialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -180,7 +180,6 @@ public: label->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Text:", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "Object &name:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::NewActionDialog", "&Icon:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__NewActionDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h b/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h index 37b9feb..9aafed4 100644 --- a/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h +++ b/tests/auto/uic/baseline/newdynamicpropertydialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'newdynamicpropertydialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -156,7 +115,6 @@ public: qdesigner_internal__NewDynamicPropertyDialog->setWindowTitle(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Create Dynamic Property", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Name", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::NewDynamicPropertyDialog", "Property Type", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__NewDynamicPropertyDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/newform.ui.h b/tests/auto/uic/baseline/newform.ui.h index c46634a..07ebebc 100644 --- a/tests/auto/uic/baseline/newform.ui.h +++ b/tests/auto/uic/baseline/newform.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'newform.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -153,7 +153,6 @@ public: ___qtreewidgetitem->setText(0, QApplication::translate("NewForm", "0", 0, QApplication::UnicodeUTF8)); lblPreview->setText(QApplication::translate("NewForm", "Choose a template for a preview", 0, QApplication::UnicodeUTF8)); chkShowOnStartup->setText(QApplication::translate("NewForm", "Show this Dialog on Startup", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(NewForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/orderdialog.ui.h b/tests/auto/uic/baseline/orderdialog.ui.h index 36c884a..4608d37 100644 --- a/tests/auto/uic/baseline/orderdialog.ui.h +++ b/tests/auto/uic/baseline/orderdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'orderdialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -155,7 +155,6 @@ public: #ifndef QT_NO_TOOLTIP downButton->setToolTip(QApplication::translate("qdesigner_internal::OrderDialog", "Move page down", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP - Q_UNUSED(qdesigner_internal__OrderDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/outputpage.ui.h b/tests/auto/uic/baseline/outputpage.ui.h index 6884679..b10101f 100644 --- a/tests/auto/uic/baseline/outputpage.ui.h +++ b/tests/auto/uic/baseline/outputpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'outputpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -135,7 +94,6 @@ public: OutputPage->setWindowTitle(QApplication::translate("OutputPage", "Form", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("OutputPage", "Project file name:", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("OutputPage", "Collection file name:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(OutputPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/pagefold.ui.h b/tests/auto/uic/baseline/pagefold.ui.h index 053b061..3efad22 100644 --- a/tests/auto/uic/baseline/pagefold.ui.h +++ b/tests/auto/uic/baseline/pagefold.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'pagefold.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/paletteeditor.ui.h b/tests/auto/uic/baseline/paletteeditor.ui.h index 7e4d970..4bd2384 100644 --- a/tests/auto/uic/baseline/paletteeditor.ui.h +++ b/tests/auto/uic/baseline/paletteeditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'paletteeditor.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -223,7 +223,6 @@ public: disabledRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Disabled", 0, QApplication::UnicodeUTF8)); inactiveRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Inactive", 0, QApplication::UnicodeUTF8)); activeRadio->setText(QApplication::translate("qdesigner_internal::PaletteEditor", "Active", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__PaletteEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h b/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h index d9733d2..557e95c 100644 --- a/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h +++ b/tests/auto/uic/baseline/paletteeditoradvancedbase.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'paletteeditoradvancedbase.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -428,7 +428,6 @@ public: #ifndef QT_NO_WHATSTHIS buttonCancel->setProperty("whatsThis", QVariant(QApplication::translate("PaletteEditorAdvancedBase", "Close dialog and discard all changes.", 0, QApplication::UnicodeUTF8))); #endif // QT_NO_WHATSTHIS - Q_UNUSED(PaletteEditorAdvancedBase); } // retranslateUi diff --git a/tests/auto/uic/baseline/passworddialog.ui.h b/tests/auto/uic/baseline/passworddialog.ui.h index 67e522c..1cf2efc 100644 --- a/tests/auto/uic/baseline/passworddialog.ui.h +++ b/tests/auto/uic/baseline/passworddialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'passworddialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -148,7 +107,6 @@ public: introLabel->setText(QApplication::translate("PasswordDialog", "INTRO TEXT DUMMY", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("PasswordDialog", "Username:", 0, QApplication::UnicodeUTF8)); lblPassword->setText(QApplication::translate("PasswordDialog", "Password:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PasswordDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/pathpage.ui.h b/tests/auto/uic/baseline/pathpage.ui.h index ca1f1a0..cc7a990 100644 --- a/tests/auto/uic/baseline/pathpage.ui.h +++ b/tests/auto/uic/baseline/pathpage.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'pathpage.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -154,7 +113,6 @@ public: label->setText(QApplication::translate("PathPage", "Documentation source file paths:", 0, QApplication::UnicodeUTF8)); addButton->setText(QApplication::translate("PathPage", "Add", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("PathPage", "Remove", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PathPage); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/phrasebookbox.ui.h b/tests/auto/uic/baseline/phrasebookbox.ui.h index 5ca3425..75438cf 100644 --- a/tests/auto/uic/baseline/phrasebookbox.ui.h +++ b/tests/auto/uic/baseline/phrasebookbox.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'phrasebookbox.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -232,7 +232,6 @@ public: closeBut->setWhatsThis(QApplication::translate("PhraseBookBox", "Click here to close this window.", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_WHATSTHIS closeBut->setText(QApplication::translate("PhraseBookBox", "Close", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PhraseBookBox); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/plugindialog.ui.h b/tests/auto/uic/baseline/plugindialog.ui.h index c140fbc..8c69d7c 100644 --- a/tests/auto/uic/baseline/plugindialog.ui.h +++ b/tests/auto/uic/baseline/plugindialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'plugindialog.ui' ** -** Created: Tue Aug 18 19:03:31 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -132,7 +132,6 @@ public: QTreeWidgetItem *___qtreewidgetitem = treeWidget->headerItem(); ___qtreewidgetitem->setText(0, QApplication::translate("PluginDialog", "1", 0, QApplication::UnicodeUTF8)); message->setText(QApplication::translate("PluginDialog", "TextLabel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PluginDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/preferencesdialog.ui.h b/tests/auto/uic/baseline/preferencesdialog.ui.h index 5a231c7..33b7e68 100644 --- a/tests/auto/uic/baseline/preferencesdialog.ui.h +++ b/tests/auto/uic/baseline/preferencesdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'preferencesdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -200,7 +159,6 @@ public: m_templatePathGroupBox->setTitle(QApplication::translate("PreferencesDialog", "Additional Template Paths", 0, QApplication::UnicodeUTF8)); m_addTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", 0, QApplication::UnicodeUTF8)); m_removeTemplatePathButton->setText(QApplication::translate("PreferencesDialog", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreferencesDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewconfigurationwidget.ui.h b/tests/auto/uic/baseline/previewconfigurationwidget.ui.h index db1c749..951792d 100644 --- a/tests/auto/uic/baseline/previewconfigurationwidget.ui.h +++ b/tests/auto/uic/baseline/previewconfigurationwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'previewconfigurationwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -161,7 +120,6 @@ public: m_appStyleSheetClearButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", 0, QApplication::UnicodeUTF8)); m_skinLabel->setText(QApplication::translate("PreviewConfigurationWidget", "Device skin", 0, QApplication::UnicodeUTF8)); m_skinRemoveButton->setText(QApplication::translate("PreviewConfigurationWidget", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreviewConfigurationWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewdialogbase.ui.h b/tests/auto/uic/baseline/previewdialogbase.ui.h index 76ea5b5..4fe4501 100644 --- a/tests/auto/uic/baseline/previewdialogbase.ui.h +++ b/tests/auto/uic/baseline/previewdialogbase.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'previewdialogbase.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -219,7 +178,6 @@ public: label_2->setText(QApplication::translate("PreviewDialogBase", "&Orientation:", 0, QApplication::UnicodeUTF8)); QTreeWidgetItem *___qtreewidgetitem = pageList->headerItem(); ___qtreewidgetitem->setText(0, QApplication::translate("PreviewDialogBase", "1", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreviewDialogBase); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewwidget.ui.h b/tests/auto/uic/baseline/previewwidget.ui.h index c49bd4a..1357435 100644 --- a/tests/auto/uic/baseline/previewwidget.ui.h +++ b/tests/auto/uic/baseline/previewwidget.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'previewwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -265,7 +265,6 @@ public: RadioButton1->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton1", 0, QApplication::UnicodeUTF8)); RadioButton2->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton2", 0, QApplication::UnicodeUTF8)); RadioButton3->setText(QApplication::translate("qdesigner_internal::PreviewWidget", "RadioButton3", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__PreviewWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/previewwidgetbase.ui.h b/tests/auto/uic/baseline/previewwidgetbase.ui.h index 4acf569..66e72bd 100644 --- a/tests/auto/uic/baseline/previewwidgetbase.ui.h +++ b/tests/auto/uic/baseline/previewwidgetbase.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'previewwidgetbase.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -303,7 +303,6 @@ public: "

\n" "http://www.kde.org\n" "

", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(PreviewWidgetBase); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/proxy.ui.h b/tests/auto/uic/baseline/proxy.ui.h index 804ce8d..19822a8 100644 --- a/tests/auto/uic/baseline/proxy.ui.h +++ b/tests/auto/uic/baseline/proxy.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'proxy.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -137,7 +96,6 @@ public: introLabel->setText(QApplication::translate("ProxyDialog", "Connect to proxy", 0, QApplication::UnicodeUTF8)); usernameLabel->setText(QApplication::translate("ProxyDialog", "Username:", 0, QApplication::UnicodeUTF8)); passwordLabel->setText(QApplication::translate("ProxyDialog", "Password:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ProxyDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qfiledialog.ui.h b/tests/auto/uic/baseline/qfiledialog.ui.h index e04a3c3..91b000a 100644 --- a/tests/auto/uic/baseline/qfiledialog.ui.h +++ b/tests/auto/uic/baseline/qfiledialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qfiledialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/qpagesetupwidget.ui.h b/tests/auto/uic/baseline/qpagesetupwidget.ui.h index ee33dc5..6d0a3b4 100644 --- a/tests/auto/uic/baseline/qpagesetupwidget.ui.h +++ b/tests/auto/uic/baseline/qpagesetupwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qpagesetupwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -347,7 +306,6 @@ public: #ifndef QT_NO_ACCESSIBILITY bottomMargin->setAccessibleName(QApplication::translate("QPageSetupWidget", "bottom margin", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_ACCESSIBILITY - Q_UNUSED(QPageSetupWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qprintpropertieswidget.ui.h b/tests/auto/uic/baseline/qprintpropertieswidget.ui.h index 1f1fa59..512fcec 100644 --- a/tests/auto/uic/baseline/qprintpropertieswidget.ui.h +++ b/tests/auto/uic/baseline/qprintpropertieswidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qprintpropertieswidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -126,7 +85,6 @@ public: QPrintPropertiesWidget->setWindowTitle(QApplication::translate("QPrintPropertiesWidget", "Form", 0, QApplication::UnicodeUTF8)); tabs->setTabText(tabs->indexOf(tabPage), QApplication::translate("QPrintPropertiesWidget", "Page", 0, QApplication::UnicodeUTF8)); tabs->setTabText(tabs->indexOf(cupsPropertiesPage), QApplication::translate("QPrintPropertiesWidget", "Advanced", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QPrintPropertiesWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qprintsettingsoutput.ui.h b/tests/auto/uic/baseline/qprintsettingsoutput.ui.h index 327a1f7..13ee6ee 100644 --- a/tests/auto/uic/baseline/qprintsettingsoutput.ui.h +++ b/tests/auto/uic/baseline/qprintsettingsoutput.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qprintsettingsoutput.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -340,7 +299,6 @@ public: duplexLong->setText(QApplication::translate("QPrintSettingsOutput", "Long side", 0, QApplication::UnicodeUTF8)); duplexShort->setText(QApplication::translate("QPrintSettingsOutput", "Short side", 0, QApplication::UnicodeUTF8)); tabs->setTabText(tabs->indexOf(optionsTab), QApplication::translate("QPrintSettingsOutput", "Options", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QPrintSettingsOutput); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qprintwidget.ui.h b/tests/auto/uic/baseline/qprintwidget.ui.h index 70ef60d..4437935 100644 --- a/tests/auto/uic/baseline/qprintwidget.ui.h +++ b/tests/auto/uic/baseline/qprintwidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qprintwidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -194,7 +153,6 @@ public: label_3->setText(QApplication::translate("QPrintWidget", "Type:", 0, QApplication::UnicodeUTF8)); lOutput->setText(QApplication::translate("QPrintWidget", "Output &file:", 0, QApplication::UnicodeUTF8)); fileBrowser->setText(QApplication::translate("QPrintWidget", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QPrintWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h b/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h index d52ef70..ed428fd 100644 --- a/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h +++ b/tests/auto/uic/baseline/qsqlconnectiondialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qsqlconnectiondialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -261,7 +220,6 @@ public: dbCheckBox->setText(QApplication::translate("QSqlConnectionDialogUi", "Us&e predefined in-memory database", 0, QApplication::UnicodeUTF8)); okButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&OK", 0, QApplication::UnicodeUTF8)); cancelButton->setText(QApplication::translate("QSqlConnectionDialogUi", "&Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QSqlConnectionDialogUi); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradientdialog.ui.h b/tests/auto/uic/baseline/qtgradientdialog.ui.h index f37606a..df41f89 100644 --- a/tests/auto/uic/baseline/qtgradientdialog.ui.h +++ b/tests/auto/uic/baseline/qtgradientdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qtgradientdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -107,7 +107,6 @@ public: void retranslateUi(QDialog *QtGradientDialog) { QtGradientDialog->setWindowTitle(QApplication::translate("QtGradientDialog", "Edit Gradient", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradienteditor.ui.h b/tests/auto/uic/baseline/qtgradienteditor.ui.h index 35de439..d0c13bf 100644 --- a/tests/auto/uic/baseline/qtgradienteditor.ui.h +++ b/tests/auto/uic/baseline/qtgradienteditor.ui.h @@ -1,4 +1,5 @@ -/**************************************************************************** +/* +********************************************************************* ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) @@ -37,12 +38,13 @@ ** ** $QT_END_LICENSE$ ** -****************************************************************************/ +********************************************************************* +*/ /******************************************************************************** ** Form generated from reading UI file 'qtgradienteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -711,7 +713,6 @@ public: reflectButton->setToolTip(QApplication::translate("QtGradientEditor", "Reflect Spread", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP reflectButton->setText(QApplication::translate("QtGradientEditor", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradientview.ui.h b/tests/auto/uic/baseline/qtgradientview.ui.h index 7f0993f..6787c8d 100644 --- a/tests/auto/uic/baseline/qtgradientview.ui.h +++ b/tests/auto/uic/baseline/qtgradientview.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qtgradientview.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -155,7 +114,6 @@ public: editButton->setText(QApplication::translate("QtGradientView", "Edit...", 0, QApplication::UnicodeUTF8)); renameButton->setText(QApplication::translate("QtGradientView", "Rename", 0, QApplication::UnicodeUTF8)); removeButton->setText(QApplication::translate("QtGradientView", "Remove", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientView); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtgradientviewdialog.ui.h b/tests/auto/uic/baseline/qtgradientviewdialog.ui.h index e67fffe..23adf0e 100644 --- a/tests/auto/uic/baseline/qtgradientviewdialog.ui.h +++ b/tests/auto/uic/baseline/qtgradientviewdialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'qtgradientviewdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -107,7 +107,6 @@ public: void retranslateUi(QDialog *QtGradientViewDialog) { QtGradientViewDialog->setWindowTitle(QApplication::translate("QtGradientViewDialog", "Select Gradient", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtGradientViewDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qtresourceeditordialog.ui.h b/tests/auto/uic/baseline/qtresourceeditordialog.ui.h index ce123fb..d434af7 100644 --- a/tests/auto/uic/baseline/qtresourceeditordialog.ui.h +++ b/tests/auto/uic/baseline/qtresourceeditordialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qtresourceeditordialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -204,7 +163,6 @@ public: removeResourceButton->setToolTip(QApplication::translate("QtResourceEditorDialog", "Remove Resource or File", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP removeResourceButton->setText(QApplication::translate("QtResourceEditorDialog", "R", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtResourceEditorDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/qttoolbardialog.ui.h b/tests/auto/uic/baseline/qttoolbardialog.ui.h index 9f3e671..35a40c3 100644 --- a/tests/auto/uic/baseline/qttoolbardialog.ui.h +++ b/tests/auto/uic/baseline/qttoolbardialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'qttoolbardialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -256,7 +215,6 @@ public: #endif // QT_NO_TOOLTIP downButton->setText(QApplication::translate("QtToolBarDialog", "Down", 0, QApplication::UnicodeUTF8)); label_3->setText(QApplication::translate("QtToolBarDialog", "Current Toolbar Actions", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QtToolBarDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/querywidget.ui.h b/tests/auto/uic/baseline/querywidget.ui.h index 67a58b3..c628457 100644 --- a/tests/auto/uic/baseline/querywidget.ui.h +++ b/tests/auto/uic/baseline/querywidget.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'querywidget.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -202,7 +161,6 @@ public: inputGroupBox->setTitle(QApplication::translate("QueryWidget", "Input Document", 0, QApplication::UnicodeUTF8)); queryGroupBox->setTitle(QApplication::translate("QueryWidget", "Select your query:", 0, QApplication::UnicodeUTF8)); outputGroupBox->setTitle(QApplication::translate("QueryWidget", "Output Document", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(QueryWidget); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/remotecontrol.ui.h b/tests/auto/uic/baseline/remotecontrol.ui.h index 53d31c7..b970fca 100644 --- a/tests/auto/uic/baseline/remotecontrol.ui.h +++ b/tests/auto/uic/baseline/remotecontrol.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'remotecontrol.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/saveformastemplate.ui.h b/tests/auto/uic/baseline/saveformastemplate.ui.h index d098c78..08d5983 100644 --- a/tests/auto/uic/baseline/saveformastemplate.ui.h +++ b/tests/auto/uic/baseline/saveformastemplate.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'saveformastemplate.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -152,7 +152,6 @@ public: label->setText(QApplication::translate("SaveFormAsTemplate", "&Name:", 0, QApplication::UnicodeUTF8)); templateNameEdit->setText(QString()); label_2->setText(QApplication::translate("SaveFormAsTemplate", "&Category:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(SaveFormAsTemplate); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/settings.ui.h b/tests/auto/uic/baseline/settings.ui.h index 1f49d9a..e09b7df 100644 --- a/tests/auto/uic/baseline/settings.ui.h +++ b/tests/auto/uic/baseline/settings.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'settings.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -234,7 +193,6 @@ public: label_3->setText(QApplication::translate("Dialog", "-10 Sec", 0, QApplication::UnicodeUTF8)); label_5->setText(QApplication::translate("Dialog", "0", 0, QApplication::UnicodeUTF8)); label_4->setText(QApplication::translate("Dialog", "10 Sec", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/signalslotdialog.ui.h b/tests/auto/uic/baseline/signalslotdialog.ui.h index 75cbd62..7bbe74c 100644 --- a/tests/auto/uic/baseline/signalslotdialog.ui.h +++ b/tests/auto/uic/baseline/signalslotdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'signalslotdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -197,7 +156,6 @@ public: removeSignalButton->setToolTip(QApplication::translate("SignalSlotDialogClass", "Delete", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP removeSignalButton->setText(QApplication::translate("SignalSlotDialogClass", "...", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(SignalSlotDialogClass); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/sslclient.ui.h b/tests/auto/uic/baseline/sslclient.ui.h index 68585fe..ef32462 100644 --- a/tests/auto/uic/baseline/sslclient.ui.h +++ b/tests/auto/uic/baseline/sslclient.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'sslclient.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -212,7 +171,6 @@ public: "

", 0, QApplication::UnicodeUTF8)); sessionInputLabel->setText(QApplication::translate("Form", "Input:", 0, QApplication::UnicodeUTF8)); sendButton->setText(QApplication::translate("Form", "&Send", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/sslerrors.ui.h b/tests/auto/uic/baseline/sslerrors.ui.h index 82486b7..ef83595 100644 --- a/tests/auto/uic/baseline/sslerrors.ui.h +++ b/tests/auto/uic/baseline/sslerrors.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'sslerrors.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -139,7 +98,6 @@ public: certificateChainButton->setText(QApplication::translate("SslErrors", "View Certificate Chain", 0, QApplication::UnicodeUTF8)); pushButton->setText(QApplication::translate("SslErrors", "Ignore", 0, QApplication::UnicodeUTF8)); pushButton_2->setText(QApplication::translate("SslErrors", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(SslErrors); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/statistics.ui.h b/tests/auto/uic/baseline/statistics.ui.h index 9e0336b..baab39b 100644 --- a/tests/auto/uic/baseline/statistics.ui.h +++ b/tests/auto/uic/baseline/statistics.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'statistics.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -209,7 +209,6 @@ public: textLabel6->setText(QApplication::translate("Statistics", "Characters (with spaces):", 0, QApplication::UnicodeUTF8)); trCharsSpc->setText(QApplication::translate("Statistics", "0", 0, QApplication::UnicodeUTF8)); untrCharsSpc->setText(QApplication::translate("Statistics", "0", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Statistics); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/stringlisteditor.ui.h b/tests/auto/uic/baseline/stringlisteditor.ui.h index cbe3cd5..9d86eba 100644 --- a/tests/auto/uic/baseline/stringlisteditor.ui.h +++ b/tests/auto/uic/baseline/stringlisteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'stringlisteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -250,7 +250,6 @@ public: downButton->setToolTip(QApplication::translate("qdesigner_internal::Dialog", "Move String Down", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_TOOLTIP downButton->setText(QApplication::translate("qdesigner_internal::Dialog", "Down", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__Dialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/stylesheeteditor.ui.h b/tests/auto/uic/baseline/stylesheeteditor.ui.h index 2e6a3b2..ea635a1 100644 --- a/tests/auto/uic/baseline/stylesheeteditor.ui.h +++ b/tests/auto/uic/baseline/stylesheeteditor.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'stylesheeteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:14 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -182,7 +141,6 @@ public: label_7->setText(QApplication::translate("StyleSheetEditor", "Style:", 0, QApplication::UnicodeUTF8)); applyButton->setText(QApplication::translate("StyleSheetEditor", "&Apply", 0, QApplication::UnicodeUTF8)); label_8->setText(QApplication::translate("StyleSheetEditor", "Style Sheet:", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(StyleSheetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/tabbedbrowser.ui.h b/tests/auto/uic/baseline/tabbedbrowser.ui.h index d188a2e..0062569 100644 --- a/tests/auto/uic/baseline/tabbedbrowser.ui.h +++ b/tests/auto/uic/baseline/tabbedbrowser.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'tabbedbrowser.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -205,7 +205,6 @@ public: checkCase->setText(QApplication::translate("TabbedBrowser", "Case Sensitive", 0, QApplication::UnicodeUTF8)); checkWholeWords->setText(QApplication::translate("TabbedBrowser", "Whole words", 0, QApplication::UnicodeUTF8)); labelWrapped->setText(QApplication::translate("TabbedBrowser", " Search wrapped", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TabbedBrowser); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/tablewidgeteditor.ui.h b/tests/auto/uic/baseline/tablewidgeteditor.ui.h index 6d79a34..5e7c8a0 100644 --- a/tests/auto/uic/baseline/tablewidgeteditor.ui.h +++ b/tests/auto/uic/baseline/tablewidgeteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'tablewidgeteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -375,7 +375,6 @@ public: #endif // QT_NO_TOOLTIP moveRowDownButton->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "D", 0, QApplication::UnicodeUTF8)); label_2->setText(QApplication::translate("qdesigner_internal::TableWidgetEditor", "Icon", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__TableWidgetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/tetrixwindow.ui.h b/tests/auto/uic/baseline/tetrixwindow.ui.h index 6f3d939..cd2f2cf 100644 --- a/tests/auto/uic/baseline/tetrixwindow.ui.h +++ b/tests/auto/uic/baseline/tetrixwindow.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'tetrixwindow.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -201,7 +160,6 @@ public: scoreLabel->setText(QApplication::translate("TetrixWindow", "SCORE", 0, QApplication::UnicodeUTF8)); nextPieceLabel->setText(QString()); quitButton->setText(QApplication::translate("TetrixWindow", "&Quit", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TetrixWindow); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/textfinder.ui.h b/tests/auto/uic/baseline/textfinder.ui.h index ffffc02..2b21412 100644 --- a/tests/auto/uic/baseline/textfinder.ui.h +++ b/tests/auto/uic/baseline/textfinder.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'textfinder.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -141,7 +100,6 @@ public: Form->setWindowTitle(QApplication::translate("Form", "Find Text", 0, QApplication::UnicodeUTF8)); searchLabel->setText(QApplication::translate("Form", "&Keyword:", 0, QApplication::UnicodeUTF8)); findButton->setText(QApplication::translate("Form", "&Find", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(Form); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/topicchooser.ui.h b/tests/auto/uic/baseline/topicchooser.ui.h index a0cc2f7..04ceede 100644 --- a/tests/auto/uic/baseline/topicchooser.ui.h +++ b/tests/auto/uic/baseline/topicchooser.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'topicchooser.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -147,7 +106,6 @@ public: label->setText(QApplication::translate("TopicChooser", "&Topics", 0, QApplication::UnicodeUTF8)); buttonDisplay->setText(QApplication::translate("TopicChooser", "&Display", 0, QApplication::UnicodeUTF8)); buttonCancel->setText(QApplication::translate("TopicChooser", "&Close", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TopicChooser); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/translatedialog.ui.h b/tests/auto/uic/baseline/translatedialog.ui.h index b4c1fb8..d8f340e 100644 --- a/tests/auto/uic/baseline/translatedialog.ui.h +++ b/tests/auto/uic/baseline/translatedialog.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'translatedialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -248,7 +248,6 @@ public: cancel->setWhatsThis(QApplication::translate("TranslateDialog", "Click here to close this window.", 0, QApplication::UnicodeUTF8)); #endif // QT_NO_WHATSTHIS cancel->setText(QApplication::translate("TranslateDialog", "Cancel", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TranslateDialog); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/translationsettings.ui.h b/tests/auto/uic/baseline/translationsettings.ui.h index 55e2431..2105b09 100644 --- a/tests/auto/uic/baseline/translationsettings.ui.h +++ b/tests/auto/uic/baseline/translationsettings.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'translationsettings.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -148,7 +107,6 @@ public: groupBox->setTitle(QApplication::translate("TranslationSettings", "Target language", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("TranslationSettings", "Language", 0, QApplication::UnicodeUTF8)); lblCountry->setText(QApplication::translate("TranslationSettings", "Country/Region", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(TranslationSettings); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/treewidgeteditor.ui.h b/tests/auto/uic/baseline/treewidgeteditor.ui.h index bb2f94e..635fef6 100644 --- a/tests/auto/uic/baseline/treewidgeteditor.ui.h +++ b/tests/auto/uic/baseline/treewidgeteditor.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'treewidgeteditor.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -349,7 +349,6 @@ public: #endif // QT_NO_TOOLTIP moveColumnDownButton->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "D", 0, QApplication::UnicodeUTF8)); label->setText(QApplication::translate("qdesigner_internal::TreeWidgetEditor", "Icon", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(qdesigner_internal__TreeWidgetEditor); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/trpreviewtool.ui.h b/tests/auto/uic/baseline/trpreviewtool.ui.h index c3dd6db..0c7d58f 100644 --- a/tests/auto/uic/baseline/trpreviewtool.ui.h +++ b/tests/auto/uic/baseline/trpreviewtool.ui.h @@ -44,7 +44,7 @@ /******************************************************************************** ** Form generated from reading UI file 'trpreviewtool.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! diff --git a/tests/auto/uic/baseline/validators.ui.h b/tests/auto/uic/baseline/validators.ui.h index d9a69eb..27b5482 100644 --- a/tests/auto/uic/baseline/validators.ui.h +++ b/tests/auto/uic/baseline/validators.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'validators.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -436,7 +395,6 @@ public: doubleLedWidget->setText(QString()); label_8->setText(QApplication::translate("ValidatorsForm", "editingFinished()", 0, QApplication::UnicodeUTF8)); pushButton->setText(QApplication::translate("ValidatorsForm", "Quit", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(ValidatorsForm); } // retranslateUi }; diff --git a/tests/auto/uic/baseline/wateringconfigdialog.ui.h b/tests/auto/uic/baseline/wateringconfigdialog.ui.h index 2877737..9e586f0 100644 --- a/tests/auto/uic/baseline/wateringconfigdialog.ui.h +++ b/tests/auto/uic/baseline/wateringconfigdialog.ui.h @@ -1,48 +1,7 @@ -/**************************************************************************** -** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain -** additional rights. These rights are described in the Nokia Qt LGPL -** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -** package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - /******************************************************************************** ** Form generated from reading UI file 'wateringconfigdialog.ui' ** -** Created: Tue Aug 18 19:03:32 2009 +** Created: Fri Sep 4 10:17:15 2009 ** by: Qt User Interface Compiler version 4.6.0 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! @@ -317,7 +276,6 @@ public: label_6->setText(QApplication::translate("WateringConfigDialog", "Filter:", 0, QApplication::UnicodeUTF8)); filterCheckBox->setText(QString()); helpLabel->setText(QApplication::translate("WateringConfigDialog", "Show Details", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(WateringConfigDialog); } // retranslateUi }; -- cgit v0.12 From 3fe3dbd2100effbd6eaf3beb6c7200879b4578a8 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 4 Sep 2009 18:56:52 +1000 Subject: Fix license headers Reviewed-by: Trust Me --- .../lupdate/testdata/good/mergeui/project.ui | 7 ++++ .../lupdate/testdata/good/parseui/project.ui | 7 ++++ .../lupdate/testdata/recursivescan/project.ui | 6 ++++ .../xmlpatternsschemats/TESTSUITE/updateSuite.sh | 40 ++++++++++++++++++++++ 4 files changed, 60 insertions(+) diff --git a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui index a7532f9..d022101 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui +++ b/tests/auto/linguist/lupdate/testdata/good/mergeui/project.ui @@ -1,14 +1,19 @@ + ********************************************************************* +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. +** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software @@ -33,6 +38,8 @@ ** ** ** $QT_END_LICENSE$ +** +********************************************************************* FindDialog diff --git a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui index 1fb4041..780bd40 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui +++ b/tests/auto/linguist/lupdate/testdata/good/parseui/project.ui @@ -1,14 +1,19 @@ +********************************************************************* +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. +** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software @@ -33,6 +38,8 @@ ** ** ** $QT_END_LICENSE$ +** +********************************************************************* FindDialog diff --git a/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui b/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui index 3aa38c8..709b3e8 100644 --- a/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui +++ b/tests/auto/linguist/lupdate/testdata/recursivescan/project.ui @@ -1,8 +1,12 @@ +********************************************************************* +** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Nokia Corporation (qt-info@nokia.com) +** ** This file is part of the test suite of the Qt Toolkit. +** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. @@ -34,6 +38,8 @@ ** ** ** $QT_END_LICENSE$ +** +********************************************************************* FindDialog diff --git a/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh b/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh index 28c22a8..7015f76 100755 --- a/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh +++ b/tests/auto/xmlpatternsschemats/TESTSUITE/updateSuite.sh @@ -1,4 +1,44 @@ #!/bin/bash +############################################################################# +## +## Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +## Contact: Nokia Corporation (qt-info@nokia.com) +## +## This file is part of the test suite of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## No Commercial Usage +## This file contains pre-release code and may not be distributed. +## You may use this file in accordance with the terms and conditions +## contained in the Technology Preview License Agreement accompanying +## this package. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 2.1 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 2.1 requirements +## will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +## +## In addition, as a special exception, Nokia gives you certain +## additional rights. These rights are described in the Nokia Qt LGPL +## Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this +## package. +## +## If you have questions regarding the use of this file, please contact +## Nokia at qt-info@nokia.com. +## +## +## +## +## +## +## +## +## $QT_END_LICENSE$ +## +############################################################################# # This script updates the suite from W3C's server. # -- cgit v0.12 From eebaf523b72fcc8802a8534cc7409f1475b7d3c5 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 4 Sep 2009 10:56:29 +0200 Subject: Added a phonon dependency to webkit We need to make sure phonon is built before webkit. Reviewed-by: Tor Arne --- src/src.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src.pro b/src/src.pro index 1801d55..780e56e 100644 --- a/src/src.pro +++ b/src/src.pro @@ -120,7 +120,7 @@ src_webkit.target = sub-webkit src_tools_activeqt.depends = src_tools_idc src_gui src_plugins.depends = src_gui src_sql src_svg contains(QT_CONFIG, webkit) { - src_webkit.depends = src_gui src_sql src_network src_xml + src_webkit.depends = src_gui src_sql src_network src_xml src_phonon #exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): src_webkit.depends += src_javascriptcore } contains(QT_CONFIG, qt3support): src_plugins.depends += src_qt3support -- cgit v0.12 From 9564ee48e588c602057ee458acfe881385681cf3 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 4 Sep 2009 11:16:34 +0200 Subject: qapplication_win.cpp compile fix for Q_WS_WINCE_WM Reviewed-by: TrustMe --- src/gui/kernel/qapplication_win.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 84edf1f..729b791 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -2035,7 +2035,6 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam #endif // Ignore the activate message send by WindowsXP to a minimized window #ifdef Q_WS_WINCE_WM - { if (widget->windowState() & Qt::WindowFullScreen) qt_wince_hide_taskbar(widget->winId()); #endif -- cgit v0.12 From 3035e9cd81dcadb23d77c69d4b1e96ec1550d67c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 3 Sep 2009 18:03:16 +0200 Subject: fix disconnect-after-write-problem in QLocalSocket on Windows If the server disconnects directly after writing its data, like the localfortuneserver example does, we must close the reading client socket. Before this patch, an error was yielded. Task-number: 260631 Reviewed-by: phartman --- src/network/socket/qlocalsocket_p.h | 2 +- src/network/socket/qlocalsocket_win.cpp | 43 +++++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h index a774cbf..a7248f6 100644 --- a/src/network/socket/qlocalsocket_p.h +++ b/src/network/socket/qlocalsocket_p.h @@ -139,7 +139,7 @@ public: void _q_emitReadyRead(); DWORD bytesAvailable(); void startAsyncRead(); - void completeAsyncRead(); + bool completeAsyncRead(); void checkReadyRead(); HANDLE handle; OVERLAPPED overlapped; diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index f70a0aa..96dfa6e 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -199,9 +199,13 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize) } } - if (!d->readSequenceStarted) - d->startAsyncRead(); - d->checkReadyRead(); + if (d->pipeClosed) { + QTimer::singleShot(0, this, SLOT(_q_pipeClosed())); + } else { + if (!d->readSequenceStarted) + d->startAsyncRead(); + d->checkReadyRead(); + } return readSoFar; } @@ -251,9 +255,22 @@ void QLocalSocketPrivate::startAsyncRead() readSequenceStarted = true; if (ReadFile(handle, ptr, bytesToRead, NULL, &overlapped)) { completeAsyncRead(); - } else if (GetLastError() != ERROR_IO_PENDING) { - setErrorString(QLatin1String("QLocalSocketPrivate::startAsyncRead")); - return; + } else { + switch (GetLastError()) { + case ERROR_IO_PENDING: + // This is not an error. We're getting notified, when data arrives. + return; + case ERROR_PIPE_NOT_CONNECTED: + { + // It may happen, that the other side closes the connection directly + // after writing data. Then we must set the appropriate socket state. + pipeClosed = true; + return; + } + default: + setErrorString(QLatin1String("QLocalSocketPrivate::startAsyncRead")); + return; + } } } while (!readSequenceStarted); } @@ -261,20 +278,23 @@ void QLocalSocketPrivate::startAsyncRead() /*! \internal Sets the correct size of the read buffer after a read operation. + Returns false, if an error occured or the connection dropped. */ -void QLocalSocketPrivate::completeAsyncRead() +bool QLocalSocketPrivate::completeAsyncRead() { ResetEvent(overlapped.hEvent); readSequenceStarted = false; DWORD bytesRead; if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) { - setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead")); - return; + if (GetLastError() != ERROR_PIPE_NOT_CONNECTED) + setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead")); + return false; } actualReadBufferSize += bytesRead; readBuffer.truncate(actualReadBufferSize); + return true; } qint64 QLocalSocket::writeData(const char *data, qint64 maxSize) @@ -425,7 +445,10 @@ void QLocalSocketPrivate::_q_canWrite() void QLocalSocketPrivate::_q_notified() { Q_Q(QLocalSocket); - completeAsyncRead(); + if (!completeAsyncRead()) { + pipeClosed = true; + return; + } startAsyncRead(); pendingReadyRead = false; emit q->readyRead(); -- cgit v0.12 From 16f9fc8ea2d9e30c1098c4435adc213d645b971f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 3 Sep 2009 18:05:19 +0200 Subject: tst_QLocalSocket::writeToClientAndDisconnect added In this test case the server writes data to the client and disconnects at once. After this, the client socket must still be able to read the data and then close itself. Task-number: 260631 Reviewed-by: phartman --- tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index a8cef92..fdfbd8a 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -107,8 +107,11 @@ private slots: void recycleServer(); + void writeToClientAndDisconnect(); + void debug(); + #ifdef Q_OS_SYMBIAN private: void unlink(QString serverName); @@ -870,6 +873,33 @@ void tst_QLocalSocket::recycleServer() QVERIFY(server.nextPendingConnection() != 0); } +void tst_QLocalSocket::writeToClientAndDisconnect() +{ +#ifdef Q_OS_SYMBIAN + unlink("writeAndDisconnectServer"); +#endif + + QLocalServer server; + QLocalSocket client; + + QVERIFY(server.listen("writeAndDisconnectServer")); + client.connectToServer("writeAndDisconnectServer"); + QVERIFY(client.waitForConnected(200)); + QVERIFY(server.waitForNewConnection(200)); + QLocalSocket* clientSocket = server.nextPendingConnection(); + QVERIFY(clientSocket); + + char buffer[100]; + memset(buffer, 0, sizeof(buffer)); + QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); + clientSocket->flush(); + clientSocket->disconnectFromServer(); + qApp->processEvents(); // give the socket the chance to receive data + QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); + qApp->processEvents(); // give the socket the chance to close itself + QCOMPARE(client.state(), QLocalSocket::UnconnectedState); +} + void tst_QLocalSocket::debug() { // Make sure this compiles -- cgit v0.12 From 818ddd1409c3fb9fdb3ff3ff2f2f8c933c6f66cf Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 4 Sep 2009 11:43:29 +0200 Subject: Small corrections in the documentation 1. "is is" -> "it is" 2. remove excess use of the work "unexpected" --- src/gui/kernel/qevent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index a61b6fa..0b282bc 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -3648,13 +3648,13 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar) \i As mentioned above, enabling touch events means multiple widgets can be receiving touch events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents, this gives you great flexibility in designing multi-touch user interfaces. Be aware of the - implications. For example, is is possible that the user is moving a QSlider with one finger and + implications. For example, it is possible that the user is moving a QSlider with one finger and pressing a QPushButton with another. The signals emitted by these widgets will be interleaved. \i Recursion into the event loop using one of the exec() methods (e.g., QDialog::exec() or QMenu::exec()) in a QTouchEvent event handler is not supported. Since there are multiple event - recipients, unexpected recursion may cause problems, including but not limited to lost events + recipients, recursion may cause problems, including but not limited to lost events and unexpected infinite recursion. \i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an -- cgit v0.12 From 41b52eb4ad4f19221577059ce1447121e757b112 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 4 Sep 2009 11:44:08 +0200 Subject: qtdemo now accept the -verbose option as specified in the help output. Reviewed-by: trustme --- demos/qtdemo/colors.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp index e63417c..455ba0c 100644 --- a/demos/qtdemo/colors.cpp +++ b/demos/qtdemo/colors.cpp @@ -274,6 +274,8 @@ void Colors::parseArgs(int argc, char *argv[]) + "[-low] [-ticker-letters] [-ticker-speed] [-no-ticker-morph] " + "[-ticker-morph-speed] [-ticker-text]"); exit(0); + } else if (s == "-verbose") { + // this option was already handled above } else{ QMessageBox::warning(0, "QtDemo", QString("Unrecognized argument:\n") + s); exit(0); -- cgit v0.12 From 19a65fca4af242269b354f82212556f88eb03eaa Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 4 Sep 2009 12:05:41 +0200 Subject: fix text eliding for arabic and syriac Arabic and Syriac are connected scripts where the letter shape changes depending on the context. Text eliding should not affect that letter shape if the truncation happens in the middle of a word. The patch ensures that by adding a Unicode ZWJ character between the text and the eliding in case the character would connect in the full string. Reviewed-by: Simon Hausmann --- src/gui/text/qtextengine.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 2b84c6c..ba9145e 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2245,6 +2245,28 @@ void QTextEngine::indexAdditionalFormats() } } +/* These two helper functions are used to determine whether we need to insert a ZWJ character + between the text that gets truncated and the ellipsis. This is important to get + correctly shaped results for arabic text. +*/ +static bool nextCharJoins(const QString &string, int pos) +{ + while (pos < string.length() && string.at(pos).category() == QChar::Mark_NonSpacing) + ++pos; + if (pos == string.length()) + return false; + return string.at(pos).joining() != QChar::OtherJoining; +} + +static bool prevCharJoins(const QString &string, int pos) +{ + while (pos > 0 && string.at(pos - 1).category() == QChar::Mark_NonSpacing) + --pos; + if (pos == 0) + return false; + return (string.at(pos - 1).joining() == QChar::Dual || string.at(pos - 1).joining() == QChar::Center); +} + QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int flags) const { // qDebug() << "elidedText; available width" << width.toReal() << "text width:" << this->width(0, layoutData->string.length()).toReal(); @@ -2345,6 +2367,9 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int } while (nextBreak < layoutData->string.length() && currentWidth < availableWidth); + if (nextCharJoins(layoutData->string, pos)) + ellipsisText.prepend(QChar(0x200d) /* ZWJ */); + return layoutData->string.left(pos) + ellipsisText; } else if (mode == Qt::ElideLeft) { QFixed currentWidth; @@ -2362,6 +2387,9 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int } while (nextBreak > 0 && currentWidth < availableWidth); + if (prevCharJoins(layoutData->string, pos)) + ellipsisText.append(QChar(0x200d) /* ZWJ */); + return ellipsisText + layoutData->string.mid(pos); } else if (mode == Qt::ElideMiddle) { QFixed leftWidth; @@ -2391,6 +2419,11 @@ QString QTextEngine::elidedText(Qt::TextElideMode mode, const QFixed &width, int && nextRightBreak > 0 && leftWidth + rightWidth < availableWidth); + if (nextCharJoins(layoutData->string, leftPos)) + ellipsisText.prepend(QChar(0x200d) /* ZWJ */); + if (prevCharJoins(layoutData->string, rightPos)) + ellipsisText.append(QChar(0x200d) /* ZWJ */); + return layoutData->string.left(leftPos) + ellipsisText + layoutData->string.mid(rightPos); } -- cgit v0.12 From 39fe2d324fd72d003ec5ac5779bc1b2c2c1cf45c Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 4 Sep 2009 11:44:03 +0200 Subject: Fixed once-in-a-while failing tst_QGraphicsItem::selected test. Added event information in QTest::mouse* warning message. Reviewed-by: Olivier --- src/testlib/qtestmouse.h | 7 +++++-- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h index 9d23c8b..665b784 100644 --- a/src/testlib/qtestmouse.h +++ b/src/testlib/qtestmouse.h @@ -67,6 +67,7 @@ QT_MODULE(Test) namespace QTest { enum MouseAction { MousePress, MouseRelease, MouseClick, MouseDClick, MouseMove }; + const char *mouseActionNames[] = { "MousePress", "MouseRelease", "MouseClick", "MouseDClick", "MouseMove" }; static void mouseEvent(MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1) @@ -113,8 +114,10 @@ namespace QTest QTEST_ASSERT(false); } QSpontaneKeyEvent::setSpontaneous(&me); - if (!qApp->notify(widget, &me)) - QTest::qWarn("Mouse event not accepted by receiving widget"); + if (!qApp->notify(widget, &me)) { + QString warning("Mouse event \"%1\" not accepted by receiving widget"); + QTest::qWarn(warning.arg(mouseActionNames[static_cast(action)]).toAscii().data()); + } } diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index aa1f2b8..408decc 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -1239,6 +1239,7 @@ void tst_QGraphicsItem::selected() QVERIFY(!item->isSelected()); // Click inside and check that it's selected + QTest::mouseMove(view.viewport()); QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos())); QCOMPARE(item->values.size(), 11); QCOMPARE(item->values.last(), true); @@ -1246,7 +1247,6 @@ void tst_QGraphicsItem::selected() // Click outside and check that it's not selected QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(item->scenePos() + QPointF(item->boundingRect().width(), item->boundingRect().height()))); - QCOMPARE(item->values.size(), 12); QCOMPARE(item->values.last(), false); QVERIFY(!item->isSelected()); -- cgit v0.12 From 3944904b361b5a585a6e07bf17528d4739caed39 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Fri, 4 Sep 2009 12:17:34 +0200 Subject: Doc: Review of docs for QGraphicsItem::ItemUsesExtendedStyleOption. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: 253733 Reviewed-by: Bjørn Erik Nilsen --- src/gui/graphicsview/qgraphicsitem.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b7c2e26..cdcb0c4 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -303,13 +303,17 @@ drop shadow effects and for decoration objects that follow the parent item's geometry without drawing on top of it. - \value ItemUsesExtendedStyleOption The item makes use of either the - exposedRect or matrix member of the QStyleOptionGraphicsItem. Implementers - of QGraphicsItem subclasses should set that flag if this data is required. - By default, the exposedRect is initialized to the item's boundingRect and - the matrix is untransformed. Enable this flag for more fine-grained values. - Use QStyleOptionGraphicsItem::levelOfDetailFromTransform() for a more - fine-grained value. + \value ItemUsesExtendedStyleOption The item makes use of either + \l{QStyleOptionGraphicsItem::}{exposedRect} or + \l{QStyleOptionGraphicsItem::}{matrix} in QStyleOptionGraphicsItem. By default, + the \l{QStyleOptionGraphicsItem::}{exposedRect} is initialized to the item's + boundingRect() and the \l{QStyleOptionGraphicsItem::}{matrix} is untransformed. + You can enable this flag for the style options to be set up with more + fine-grained values. + Note that QStyleOptionGraphicsItem::levelOfDetail is unaffected by this flag + and always initialized to 1. Use + QStyleOptionGraphicsItem::levelOfDetailFromTransform() if you need a higher + value. \value ItemHasNoContents The item does not paint anything (i.e., calling paint() on the item has no effect). You should set this flag on items that -- cgit v0.12 From 228153b29c3e235fa5d40ff09f8403fa2e8f7226 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 29 Jan 2009 16:07:27 +0100 Subject: Fix oversize-buffer support for aligning. Since Vector initialises VectorBase with the value of inlineBuffer(), it does so before the m_inlineBuffer member has had a chance to initialise. This lead to dereferencing of uninitialised pointers and, as was expected, crashes. --- src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index e3cb718..11c20a9 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -67,10 +67,11 @@ namespace WTF { template struct AlignedBuffer { AlignedBufferChar oversizebuffer[size + 64]; - AlignedBufferChar *buffer; - inline AlignedBuffer() : buffer(oversizebuffer) + AlignedBufferChar *buffer() { - buffer += 64 - (reinterpret_cast(buffer) & 0x3f); + AlignedBufferChar *ptr = oversizebuffer; + ptr += 64 - (reinterpret_cast(ptr) & 0x3f); + return ptr; } }; #endif @@ -440,7 +441,11 @@ namespace WTF { using Base::m_capacity; static const size_t m_inlineBufferSize = inlineCapacity * sizeof(T); + #ifdef WTF_ALIGNED T* inlineBuffer() { return reinterpret_cast(m_inlineBuffer.buffer); } + #else + T* inlineBuffer() { return reinterpret_cast(m_inlineBuffer.buffer()); } + #endif AlignedBuffer m_inlineBuffer; }; -- cgit v0.12 From 6f1ff47beeee6a6af489df58813ebd87237c93b0 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 23 Jul 2009 16:55:01 +0200 Subject: Fix linking with SunCC 5.9: de-inline the operator new and delete in ParserArenaDeletable. If you mark functions as "inline", the compiler doesn't have to emit out-of-line copies. What happens is that Nodes.h declares these functions, but the inline bodies are in NodeConstructors.h. ParserArena.cpp used these functions, but didn't include NodeConstructor.h. I could have added the missing #include, but this is error-prone, since you have to remember to do that. Moving the bodies into Nodes.h was also not possible, because it requires JSC::Parser to be defined and Parser.h needs to #include "Nodes.h". So the solution is to de-inline. --- .../webkit/JavaScriptCore/parser/NodeConstructors.h | 17 ----------------- .../webkit/JavaScriptCore/parser/ParserArena.cpp | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h index c256190..a4374d3 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h +++ b/src/3rdparty/webkit/JavaScriptCore/parser/NodeConstructors.h @@ -27,23 +27,6 @@ namespace JSC { - inline void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) - { - ParserArenaDeletable* deletable = static_cast(fastMalloc(size)); - globalData->parser->arena().deleteWithArena(deletable); - return deletable; - } - - inline void* ParserArenaDeletable::operator new(size_t size) - { - return fastMalloc(size); - } - - inline void ParserArenaDeletable::operator delete(void* p) - { - fastFree(p); - } - inline ParserArenaRefCounted::ParserArenaRefCounted(JSGlobalData* globalData) { globalData->parser->arena().derefWithArena(adoptRef(this)); diff --git a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp index 2617506..78c5196 100644 --- a/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/parser/ParserArena.cpp @@ -24,6 +24,7 @@ */ #include "config.h" +#include "Parser.h" #include "ParserArena.h" #include "Nodes.h" @@ -57,4 +58,21 @@ void ParserArena::reset() m_refCountedObjects.shrink(0); } +void* ParserArenaDeletable::operator new(size_t size, JSGlobalData* globalData) +{ + ParserArenaDeletable* deletable = static_cast(fastMalloc(size)); + globalData->parser->arena().deleteWithArena(deletable); + return deletable; +} + +void* ParserArenaDeletable::operator new(size_t size) +{ + return fastMalloc(size); +} + +void ParserArenaDeletable::operator delete(void* p) +{ + fastFree(p); +} + } -- cgit v0.12 From b9fdc5636c166e26195d783378ff4da43b755bc5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 19 Jul 2009 15:14:06 +0200 Subject: Fix compilation error on Solaris: mmap/munmap take/return a char*, not void*. "../JavaScriptCore/interpreter/RegisterFile.h", line 128: Error: Using static_cast to convert from char* to JSC::Register* not allowed. Error: Formal argument 1 of type char* in call to munmap(char*, unsigned) is being passed JSC::Register*. --- src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp | 2 +- src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp index 06ddefc..29a13ca 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.cpp @@ -34,7 +34,7 @@ namespace JSC { RegisterFile::~RegisterFile() { #if HAVE(MMAP) - munmap(m_buffer, ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); + munmap(reinterpret_cast(m_buffer), ((m_max - m_start) + m_maxGlobals) * sizeof(Register)); #elif HAVE(VIRTUALALLOC) VirtualFree(m_buffer, 0, MEM_RELEASE); #else diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h index 5a34d11..14e189e 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/RegisterFile.h @@ -105,7 +105,7 @@ namespace JSC { ReturnValueRegister = -4, ArgumentCount = -3, Callee = -2, - OptionalCalleeArguments = -1, + OptionalCalleeArguments = -1 }; enum { ProgramCodeThisRegister = -CallFrameHeaderSize - 1 }; @@ -174,7 +174,7 @@ namespace JSC { size_t bufferLength = (capacity + maxGlobals) * sizeof(Register); #if HAVE(MMAP) - m_buffer = static_cast(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); + m_buffer = reinterpret_cast(mmap(0, bufferLength, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, VM_TAG_FOR_REGISTERFILE_MEMORY, 0)); if (m_buffer == MAP_FAILED) { #if PLATFORM(WINCE) fprintf(stderr, "Could not allocate register file: %d\n", GetLastError()); -- cgit v0.12 From bd3c95917dfe2c2740403176935bf84ada9df403 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Jul 2009 14:18:35 +0200 Subject: Fix compilation with Sun CC 5.9: moving elements in a vector requires source not to be const I don't know why the compiler couldn't call src->~T() on a const T *src, but fact is it couldn't. In any case, since move is copying the source and deleting it, formally the argument shouldn't be const anyway. --- src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index 11c20a9..7decc4a 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -129,7 +129,7 @@ namespace WTF { template struct VectorMover { - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { while (src != srcEnd) { new (dst) T(*src); @@ -138,7 +138,7 @@ namespace WTF { ++src; } } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { if (src > dst) move(src, srcEnd, dst); @@ -157,11 +157,11 @@ namespace WTF { template struct VectorMover { - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { memcpy(dst, src, reinterpret_cast(srcEnd) - reinterpret_cast(src)); } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { memmove(dst, src, reinterpret_cast(srcEnd) - reinterpret_cast(src)); } @@ -254,12 +254,12 @@ namespace WTF { VectorInitializer::needsInitialization, VectorTraits::canInitializeWithMemset, T>::initialize(begin, end); } - static void move(const T* src, const T* srcEnd, T* dst) + static void move(T* src, const T* srcEnd, T* dst) { VectorMover::canMoveWithMemcpy, T>::move(src, srcEnd, dst); } - static void moveOverlapping(const T* src, const T* srcEnd, T* dst) + static void moveOverlapping(T* src, const T* srcEnd, T* dst) { VectorMover::canMoveWithMemcpy, T>::moveOverlapping(src, srcEnd, dst); } -- cgit v0.12 From 37b26723280e7fbda5fb3a5960105eda25f5c53f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Sep 2009 14:06:41 +0200 Subject: Remove comma at end of enum. Some compilers are more picky than others. Conflicts: src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h --- src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h | 2 +- src/3rdparty/webkit/WebCore/bridge/npapi.h | 3 ++- src/3rdparty/webkit/WebCore/dom/ExceptionCode.h | 2 +- src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h | 2 +- src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h | 2 +- src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h | 2 +- src/3rdparty/webkit/WebCore/loader/FrameLoader.h | 2 +- src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h | 2 +- src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h | 2 +- src/3rdparty/webkit/WebCore/platform/ScrollTypes.h | 4 ++-- src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h | 2 +- src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h | 2 +- src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h | 2 +- src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h | 2 +- src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h | 2 +- src/3rdparty/webkit/WebCore/platform/text/StringImpl.h | 2 +- src/3rdparty/webkit/WebCore/platform/text/TextCodec.h | 2 +- src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h | 2 +- src/3rdparty/webkit/WebCore/rendering/RenderLayer.h | 2 +- 19 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h index 12291cc..070b76c 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/MessageQueue.h @@ -41,7 +41,7 @@ namespace WTF { enum MessageQueueWaitResult { MessageQueueTerminated, // Queue was destroyed while waiting for message. MessageQueueTimeout, // Timeout was specified and it expired. - MessageQueueMessageReceived, // A message was successfully received and returned. + MessageQueueMessageReceived // A message was successfully received and returned. }; template diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h index 07fed86..2ff657e 100644 --- a/src/3rdparty/webkit/WebCore/bridge/npapi.h +++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h @@ -350,9 +350,10 @@ typedef enum { NPPVpluginWantsAllNetworkStreams = 18, /* Checks to see if the plug-in would like the browser to load the "src" attribute. */ - NPPVpluginCancelSrcStream = 20, + NPPVpluginCancelSrcStream = 20 #ifdef XP_MACOSX + , /* Used for negotiating drawing models */ NPPVpluginDrawingModel = 1000, /* Used for negotiating event models */ diff --git a/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h b/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h index 58b18e2..08bffa6 100644 --- a/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h +++ b/src/3rdparty/webkit/WebCore/dom/ExceptionCode.h @@ -57,7 +57,7 @@ namespace WebCore { NETWORK_ERR = 19, ABORT_ERR = 20, URL_MISMATCH_ERR = 21, - QUOTA_EXCEEDED_ERR = 22, + QUOTA_EXCEEDED_ERR = 22 }; enum ExceptionType { diff --git a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h index 3f8febc..f95f0045 100644 --- a/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h +++ b/src/3rdparty/webkit/WebCore/dom/ScriptExecutionContext.h @@ -45,7 +45,7 @@ namespace WebCore { enum MessageDestination { InspectorControllerDestination, - ConsoleDestination, + ConsoleDestination }; class ScriptExecutionContext { diff --git a/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h b/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h index 5b732dc..b8b137d 100644 --- a/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h +++ b/src/3rdparty/webkit/WebCore/editing/EditorInsertAction.h @@ -32,7 +32,7 @@ namespace WebCore { enum EditorInsertAction { EditorInsertActionTyped, EditorInsertActionPasted, - EditorInsertActionDropped, + EditorInsertActionDropped }; } // namespace diff --git a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h index cc3627d..fdd854c 100644 --- a/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h +++ b/src/3rdparty/webkit/WebCore/generated/CSSPropertyNames.h @@ -275,7 +275,7 @@ enum CSSPropertyID { CSSPropertyGlyphOrientationVertical = 1268, CSSPropertyKerning = 1269, CSSPropertyTextAnchor = 1270, - CSSPropertyWritingMode = 1271, + CSSPropertyWritingMode = 1271 }; const int firstCSSProperty = 1001; diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h index 58bf2c0..c41e491 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoader.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoader.h @@ -355,7 +355,7 @@ namespace WebCore { enum LocalLoadPolicy { AllowLocalLoadsForAll, // No restriction on local loads. AllowLocalLoadsForLocalAndSubstituteData, - AllowLocalLoadsForLocalOnly, + AllowLocalLoadsForLocalOnly }; static void setLocalLoadPolicy(LocalLoadPolicy); static bool restrictAccessToLocal(); diff --git a/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h b/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h index c264b47..b3823ba 100644 --- a/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h +++ b/src/3rdparty/webkit/WebCore/loader/FrameLoaderTypes.h @@ -42,7 +42,7 @@ namespace WebCore { enum PolicyAction { PolicyUse, PolicyDownload, - PolicyIgnore, + PolicyIgnore }; enum FrameLoadType { diff --git a/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h b/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h index 4a6bc9e..d9701b7 100644 --- a/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h +++ b/src/3rdparty/webkit/WebCore/platform/PlatformKeyboardEvent.h @@ -81,7 +81,7 @@ namespace WebCore { AltKey = 1 << 0, CtrlKey = 1 << 1, MetaKey = 1 << 2, - ShiftKey = 1 << 3, + ShiftKey = 1 << 3 }; Type type() const { return m_type; } diff --git a/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h b/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h index eba9055..b0df470 100644 --- a/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h +++ b/src/3rdparty/webkit/WebCore/platform/ScrollTypes.h @@ -53,7 +53,7 @@ namespace WebCore { enum ScrollbarControlStateMask { ActiveScrollbarState = 1, EnabledScrollbarState = 1 << 1, - PressedScrollbarState = 1 << 2, + PressedScrollbarState = 1 << 2 }; enum ScrollbarPart { @@ -67,7 +67,7 @@ namespace WebCore { ForwardButtonEndPart = 1 << 6, ScrollbarBGPart = 1 << 7, TrackBGPart = 1 << 8, - AllParts = 0xffffffff, + AllParts = 0xffffffff }; enum ScrollbarButtonsPlacement { diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h index 8b770a1..a3a0493 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.h @@ -150,7 +150,7 @@ protected: enum RepetitionCountStatus { Unknown, // We haven't checked the source's repetition count. Uncertain, // We have a repetition count, but it might be wrong (some GIFs have a count after the image data, and will report "loop once" until all data has been decoded). - Certain, // The repetition count is known to be correct. + Certain // The repetition count is known to be correct. }; BitmapImage(NativeImagePtr, ImageObserver* = 0); diff --git a/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h b/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h index 9c2a9d7..494e2bb 100644 --- a/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h +++ b/src/3rdparty/webkit/WebCore/platform/image-decoders/ImageDecoder.h @@ -52,7 +52,7 @@ namespace WebCore { DisposeNotSpecified, // Leave frame in framebuffer DisposeKeep, // Leave frame in framebuffer DisposeOverwriteBgcolor, // Clear frame to transparent - DisposeOverwritePrevious, // Clear frame to previous framebuffer contents + DisposeOverwritePrevious // Clear frame to previous framebuffer contents }; #if PLATFORM(SKIA) typedef uint32_t PixelData; diff --git a/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h b/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h index 9a73cff..b7d4574 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ProtectionSpace.h @@ -46,7 +46,7 @@ enum ProtectionSpaceAuthenticationScheme { ProtectionSpaceAuthenticationSchemeHTTPDigest = 3, ProtectionSpaceAuthenticationSchemeHTMLForm = 4, ProtectionSpaceAuthenticationSchemeNTLM = 5, - ProtectionSpaceAuthenticationSchemeNegotiate = 6, + ProtectionSpaceAuthenticationSchemeNegotiate = 6 }; class ProtectionSpace { diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h index c99be54..b8a8cbb 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceHandleClient.h @@ -56,7 +56,7 @@ namespace WebCore { enum CacheStoragePolicy { StorageAllowed, StorageAllowedInMemoryOnly, - StorageNotAllowed, + StorageNotAllowed }; class ResourceHandleClient { diff --git a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h index 2d87d6e..740ebed 100644 --- a/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h +++ b/src/3rdparty/webkit/WebCore/platform/network/ResourceRequestBase.h @@ -41,7 +41,7 @@ namespace WebCore { UseProtocolCachePolicy, // normal load ReloadIgnoringCacheData, // reload ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data - ReturnCacheDataDontLoad, // results of a post - allow stale data and only use cache + ReturnCacheDataDontLoad // results of a post - allow stale data and only use cache }; const int unspecifiedTimeoutInterval = INT_MAX; diff --git a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h index 38439ed..4325925 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h +++ b/src/3rdparty/webkit/WebCore/platform/text/StringImpl.h @@ -199,7 +199,7 @@ private: enum StringImplFlags { HasTerminatingNullCharacter, - InTable, + InTable }; unsigned m_length; diff --git a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h index 3c74165..36d7c6e 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h +++ b/src/3rdparty/webkit/WebCore/platform/text/TextCodec.h @@ -51,7 +51,7 @@ namespace WebCore { // Encodes the character as en entity as above, but escaped // non-alphanumeric characters. This is used in URLs. // For example, U+6DE would be "%26%231758%3B". - URLEncodedEntitiesForUnencodables, + URLEncodedEntitiesForUnencodables }; typedef char UnencodableReplacementArray[32]; diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h b/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h index b652c6e..8183050 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginQuirkSet.h @@ -45,7 +45,7 @@ namespace WebCore { PluginQuirkDontClipToZeroRectWhenScrolling = 1 << 9, PluginQuirkDontSetNullWindowHandleOnDestroy = 1 << 10, PluginQuirkDontAllowMultipleInstances = 1 << 11, - PluginQuirkRequiresGtkToolKit = 1 << 12, + PluginQuirkRequiresGtkToolKit = 1 << 12 }; class PluginQuirkSet { diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h index 1772c66..541002f 100644 --- a/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h +++ b/src/3rdparty/webkit/WebCore/rendering/RenderLayer.h @@ -298,7 +298,7 @@ public: enum UpdateLayerPositionsFlag { DoFullRepaint = 1, CheckForRepaint = 1 << 1, - UpdateCompositingLayers = 1 << 2, + UpdateCompositingLayers = 1 << 2 }; typedef unsigned UpdateLayerPositionsFlags; void updateLayerPositions(UpdateLayerPositionsFlags = DoFullRepaint | UpdateCompositingLayers); -- cgit v0.12 From fd348f0cc28db4a20b06102b419139c0f1473aec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Sep 2009 14:07:49 +0200 Subject: Fix compilation with Sun CC 5.9: ambiguity in ?: Error: Ambiguous "?:" expression, second operand of type "WTF::PassRefPtr" and third operand of type "int" can be converted to one another. Error: Ambiguous "?:" expression, second operand of type "WTF::PassRefPtr" and third operand of type "int" can be converted to one another. [and others similar] Conflicts: src/3rdparty/webkit/WebCore/workers/WorkerContext.cpp --- .../webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp | 2 +- src/3rdparty/webkit/WebCore/editing/CompositeEditCommand.cpp | 2 +- src/3rdparty/webkit/WebCore/editing/markup.cpp | 2 +- src/3rdparty/webkit/WebCore/html/HTMLParser.cpp | 4 ++-- src/3rdparty/webkit/WebCore/loader/DocumentLoader.cpp | 2 +- .../webkit/WebCore/loader/appcache/ApplicationCacheGroup.cpp | 2 +- src/3rdparty/webkit/WebCore/loader/archive/ArchiveFactory.cpp | 2 +- src/3rdparty/webkit/WebCore/loader/archive/ArchiveResource.cpp | 6 +++--- src/3rdparty/webkit/WebCore/loader/icon/IconDatabase.cpp | 2 +- src/3rdparty/webkit/WebCore/page/DOMWindow.cpp | 2 +- src/3rdparty/webkit/WebCore/page/animation/AnimationBase.cpp | 2 +- src/3rdparty/webkit/WebCore/rendering/RenderLayer.cpp | 4 ++-- src/3rdparty/webkit/WebCore/rendering/RenderScrollbar.cpp | 2 +- src/3rdparty/webkit/WebCore/rendering/RenderTextFragment.cpp | 2 +- src/3rdparty/webkit/WebCore/svg/SVGElement.cpp | 2 +- src/3rdparty/webkit/WebCore/workers/Worker.cpp | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp index ce5518f..711beb4 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp @@ -521,7 +521,7 @@ PassRefPtr BytecodeGenerator::newLabelScope(LabelScope::Type type, c m_labelScopes.removeLast(); // Allocate new label scope. - LabelScope scope(type, name, scopeDepth(), newLabel(), type == LabelScope::Loop ? newLabel() : PassRefPtr