summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/deployment/deployment.qdoc2
-rw-r--r--doc/src/examples/hellogl_es.qdoc23
-rw-r--r--doc/src/qt4-intro.qdoc24
-rw-r--r--src/gui/kernel/qwidget.cpp20
-rw-r--r--src/gui/widgets/qdatetimeedit.cpp2
-rw-r--r--src/gui/widgets/qmenu.cpp4
-rw-r--r--src/opengl/qglshaderprogram.cpp58
-rw-r--r--src/opengl/qglshaderprogram.h11
-rw-r--r--tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro4
-rw-r--r--tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp6
-rw-r--r--tests/auto/qapplication/tst_qapplication.cpp30
-rw-r--r--tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp2
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp17
13 files changed, 119 insertions, 84 deletions
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index bc6ae98..005f066 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -109,8 +109,6 @@
\row
\o \l {Phonon Module}{Phonon}
\o \l {Qt3Support}
- \o \l {}
- \o \l {}
\endtable
Since Qt is not a system library, it has to be redistributed along
diff --git a/doc/src/examples/hellogl_es.qdoc b/doc/src/examples/hellogl_es.qdoc
index fca1150..67a83e0 100644
--- a/doc/src/examples/hellogl_es.qdoc
+++ b/doc/src/examples/hellogl_es.qdoc
@@ -64,29 +64,6 @@
the OpenGL ES window within the native window manager. In
QGLWidget::initializeGL() we initialize OpenGL ES.
- \section1 Using OpenGL ES rendering commands
-
- To update the scene, we reimplment QGLWidget::paintGL(). We use OpenGL ES
- rendering commands just like we do with standard OpenGL. Since the OpenGL
- ES common light profile only supports fixed point functions, we need to
- abstract it somehow. Hence, we define an abstraction layer in
- \c{cl_helper.h}.
-
- \snippet examples/opengl/hellogl_es/cl_helper.h 0
-
- Instead of \c glFogxv() or \c glFogfv() we use \c q_glFogv() and to
- convert the coordinates of a vertice we use the macro \c f2vt(). That way,
- if QT_OPENGL_ES_CL is defined we use the fixed point functions and every
- float is converted to fixed point.
-
- If QT_OPENGL_ES_CL is not defined we use the floating point functions.
-
- \snippet examples/opengl/hellogl_es/cl_helper.h 1
-
- This way we support OpenGL ES Common and Common Light with the same code
- and abstract the fact that we use either the floating point functions or
- otherwise the fixed point functions.
-
\section1 Porting OpenGL to OpenGL ES
Since OpenGL ES is missing the immediate mode and does not support quads,
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index daceba5..5344bcc 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -457,6 +457,30 @@
*/
/*!
+ \page qt4-7-intro.html
+ \title What's New in Qt 4.7
+
+ Qt 4.7 provides many improvements and enhancements over the
+ previous releases in the Qt 4 series. This document covers the
+ most important features in this release, separated by category.
+
+ A list of other Qt 4 features can be found on the \bold{\l{What's
+ New in Qt 4}} page.
+
+ \bold{Highlights}
+
+ \tableofcontents
+
+ \section1 New Classes, Functions, Macros, etc.
+
+ Links to new classes, functions, macros, and other items
+ introduced in Qt 4.7.
+
+ \sincelist 4.7
+
+*/
+
+/*!
\page qt4-6-intro.html
\title What's New in Qt 4.6
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index e678220..884447d 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -7573,23 +7573,21 @@ bool QWidgetPrivate::close_helper(CloseMode mode)
if (isMain)
QApplication::quit();
#endif
- // Attempt to close the application only if this widget has the
- // WA_QuitOnClose flag set set and has a non-visible parent
- quitOnClose = quitOnClose && (parentWidget.isNull() || !parentWidget->isVisible() || parentWidget->testAttribute(Qt::WA_DontShowOnScreen));
+ // Attempt to close the application only if this has WA_QuitOnClose set and a non-visible parent
+ quitOnClose = quitOnClose && (parentWidget.isNull() || !parentWidget->isVisible());
if (quitOnClose) {
- // If there is no non-withdrawn primary window left (except
- // the ones without QuitOnClose or with WA_DontShowOnScreen),
- // we emit the lastWindowClosed signal
+ /* if there is no non-withdrawn primary window left (except
+ the ones without QuitOnClose), we emit the lastWindowClosed
+ signal */
QWidgetList list = QApplication::topLevelWidgets();
bool lastWindowClosed = true;
for (int i = 0; i < list.size(); ++i) {
QWidget *w = list.at(i);
- if ((w->isVisible() && !w->testAttribute(Qt::WA_DontShowOnScreen))
- && !w->parentWidget() && w->testAttribute(Qt::WA_QuitOnClose)) {
- lastWindowClosed = false;
- break;
- }
+ if (!w->isVisible() || w->parentWidget() || !w->testAttribute(Qt::WA_QuitOnClose))
+ continue;
+ lastWindowClosed = false;
+ break;
}
if (lastWindowClosed)
QApplicationPrivate::emitLastWindowClosed();
diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp
index 762db86..50fa9c9 100644
--- a/src/gui/widgets/qdatetimeedit.cpp
+++ b/src/gui/widgets/qdatetimeedit.cpp
@@ -1175,7 +1175,7 @@ void QDateTimeEdit::keyPressEvent(QKeyEvent *event)
return; }
}
QAbstractSpinBox::keyPressEvent(event);
- if (select && !(event->modifiers() & Qt::ShiftModifier) && !d->edit->hasSelectedText()) {
+ if (select && !d->edit->hasSelectedText()) {
if (inserted && d->sectionAt(d->edit->cursorPosition()) == QDateTimeParser::NoSectionIndex) {
QString str = d->displayText();
int pos = d->edit->cursorPosition();
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index 8ce7cc0..08960da 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -2302,9 +2302,7 @@ void QMenu::mouseReleaseEvent(QMouseEvent *e)
QAction *action = d->actionAt(e->pos());
if (action && action == d->currentAction) {
- if (action->menu())
- action->menu()->d_func()->setFirstActionActive();
- else {
+ if (!action->menu()){
#if defined(Q_WS_WIN)
//On Windows only context menus can be activated with the right button
if (e->button() == Qt::LeftButton || d->topCausedWidget() == 0)
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 80b4872..8fd4acf 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -1555,8 +1555,8 @@ void QGLShaderProgram::setAttributeArray
indicates the number of components per vertex: 1, 2, 3, or 4.
The array will become active when enableAttributeArray() is called
- on the \a location. Otherwise the value specified with
- setAttributeValue() for \a location will be used.
+ on the \a name. Otherwise the value specified with
+ setAttributeValue() for \a name will be used.
The setAttributeBuffer() function can be used to set the attribute
array to an offset within a vertex buffer.
@@ -1572,15 +1572,16 @@ void QGLShaderProgram::setAttributeArray
}
/*!
- Sets an array of vertex values on the attribute at \a location
- in this shader program, starting at a specific \a offset in the
+ Sets an array of vertex values on the attribute at \a location in
+ this shader program, starting at a specific \a offset in the
currently bound vertex buffer. The \a stride indicates the number
of bytes between vertices. A default \a stride value of zero
- indicates that the vertices are densely packed in \a values.
+ indicates that the vertices are densely packed in the value array.
- The \a type indicates the type of elements in the \a values array,
- usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a tupleSize
- indicates the number of components per vertex: 1, 2, 3, or 4.
+ The \a type indicates the type of elements in the vertex value
+ array, usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a
+ tupleSize indicates the number of components per vertex: 1, 2, 3,
+ or 4.
The array will become active when enableAttributeArray() is called
on the \a location. Otherwise the value specified with
@@ -1607,15 +1608,16 @@ void QGLShaderProgram::setAttributeBuffer
in this shader program, starting at a specific \a offset in the
currently bound vertex buffer. The \a stride indicates the number
of bytes between vertices. A default \a stride value of zero
- indicates that the vertices are densely packed in \a values.
+ indicates that the vertices are densely packed in the value array.
- The \a type indicates the type of elements in the \a values array,
- usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a tupleSize
- indicates the number of components per vertex: 1, 2, 3, or 4.
+ The \a type indicates the type of elements in the vertex value
+ array, usually \c{GL_FLOAT}, \c{GL_UNSIGNED_BYTE}, etc. The \a
+ tupleSize indicates the number of components per vertex: 1, 2, 3,
+ or 4.
The array will become active when enableAttributeArray() is called
- on the \a location. Otherwise the value specified with
- setAttributeValue() for \a location will be used.
+ on the \a name. Otherwise the value specified with
+ setAttributeValue() for \a name will be used.
\sa setAttributeArray()
\since 4.7
@@ -3078,6 +3080,34 @@ void QGLShaderProgram::shaderDestroyed()
#ifdef Q_MAC_COMPAT_GL_FUNCTIONS
/*! \internal */
+void QGLShaderProgram::setAttributeArray
+ (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride)
+{
+ setAttributeArray(location, GLenum(type), values, tupleSize, stride);
+}
+
+/*! \internal */
+void QGLShaderProgram::setAttributeArray
+ (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride)
+{
+ setAttributeArray(name, GLenum(type), values, tupleSize, stride);
+}
+
+/*! \internal */
+void QGLShaderProgram::setAttributeBuffer
+ (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride)
+{
+ setAttributeBuffer(location, GLenum(type), offset, tupleSize, stride);
+}
+
+/*! \internal */
+void QGLShaderProgram::setAttributeBuffer
+ (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride)
+{
+ setAttributeBuffer(name, GLenum(type), offset, tupleSize, stride);
+}
+
+/*! \internal */
void QGLShaderProgram::setUniformValue(int location, QMacCompatGLint value)
{
setUniformValue(location, GLint(value));
diff --git a/src/opengl/qglshaderprogram.h b/src/opengl/qglshaderprogram.h
index 2500275..19ce9f2 100644
--- a/src/opengl/qglshaderprogram.h
+++ b/src/opengl/qglshaderprogram.h
@@ -182,6 +182,17 @@ public:
void setAttributeBuffer
(const char *name, GLenum type, int offset, int tupleSize, int stride = 0);
+#ifdef Q_MAC_COMPAT_GL_FUNCTIONS
+ void setAttributeArray
+ (int location, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0);
+ void setAttributeArray
+ (const char *name, QMacCompatGLenum type, const void *values, int tupleSize, int stride = 0);
+ void setAttributeBuffer
+ (int location, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0);
+ void setAttributeBuffer
+ (const char *name, QMacCompatGLenum type, int offset, int tupleSize, int stride = 0);
+#endif
+
void enableAttributeArray(int location);
void enableAttributeArray(const char *name);
void disableAttributeArray(int location);
diff --git a/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro b/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro
index 462723e..8e58a32 100644
--- a/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro
+++ b/tests/auto/declarative/qmlxmllistmodel/qmlxmllistmodel.pro
@@ -1,5 +1,9 @@
load(qttest_p4)
contains(QT_CONFIG,declarative): QT += declarative gui
+contains(QT_CONFIG,xmlpatterns) {
+ QT += xmlpatterns
+ DEFINES += QTEST_XMLPATTERNS
+}
macx:CONFIG -= app_bundle
SOURCES += tst_qmlxmllistmodel.cpp
diff --git a/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp b/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp
index 8e97b7c..039cbf4 100644
--- a/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp
+++ b/tests/auto/declarative/qmlxmllistmodel/tst_qmlxmllistmodel.cpp
@@ -39,6 +39,8 @@
**
****************************************************************************/
#include <qtest.h>
+
+#ifdef QTEST_XMLPATTERNS
#include <QtDeclarative/qmlengine.h>
#include <QtDeclarative/qmlcomponent.h>
#include <private/qmlxmllistmodel_p.h>
@@ -195,3 +197,7 @@ void tst_qmlxmllistmodel::uniqueRoleNames()
QTEST_MAIN(tst_qmlxmllistmodel)
#include "tst_qmlxmllistmodel.moc"
+
+#else
+QTEST_NOOP_MAIN
+#endif
diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp
index b464867..459ac2b 100644
--- a/tests/auto/qapplication/tst_qapplication.cpp
+++ b/tests/auto/qapplication/tst_qapplication.cpp
@@ -706,36 +706,6 @@ void tst_QApplication::quitOnLastWindowClosed()
QSignalSpy spy(&app, SIGNAL(aboutToQuit()));
QSignalSpy spy2(&timer, SIGNAL(timeout()));
- QPointer<QMainWindow> mainWindow = new QMainWindow;
- QPointer<QWidget> invisibleTopLevelWidget = new QWidget;
- invisibleTopLevelWidget->setAttribute(Qt::WA_DontShowOnScreen);
-
- QVERIFY(app.quitOnLastWindowClosed());
- QVERIFY(mainWindow->testAttribute(Qt::WA_QuitOnClose));
- QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_QuitOnClose));
- QVERIFY(invisibleTopLevelWidget->testAttribute(Qt::WA_DontShowOnScreen));
-
- mainWindow->show();
- invisibleTopLevelWidget->show();
-
- timer.start();
- QTimer::singleShot(1000, mainWindow, SLOT(close())); // This should quit the application
- QTimer::singleShot(2000, &app, SLOT(quit())); // This makes sure we quit even if it didn't
-
- app.exec();
-
- QCOMPARE(spy.count(), 1);
- QVERIFY(spy2.count() < 15); // Should be around 10 if closing caused the quit
- }
- {
- int argc = 0;
- QApplication app(argc, 0, QApplication::GuiServer);
- QTimer timer;
- timer.setInterval(100);
-
- QSignalSpy spy(&app, SIGNAL(aboutToQuit()));
- QSignalSpy spy2(&timer, SIGNAL(timeout()));
-
QPointer<CloseEventTestWindow> mainWindow = new CloseEventTestWindow;
QVERIFY(app.quitOnLastWindowClosed());
diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
index b92b873..558d4de 100644
--- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -3357,6 +3357,8 @@ void tst_QDateTimeEdit::keypadAutoAdvance_data()
QTest::addColumn<Qt::KeyboardModifiers>("modifiers");
QTest::newRow("None") << (Qt::KeyboardModifiers)Qt::NoModifier;
QTest::newRow("Keypad") << (Qt::KeyboardModifiers)Qt::KeypadModifier;
+ // QTBUG-7842: Using KeyPad with shift (numlock off)
+ QTest::newRow("Keypad+Shift") << (Qt::KeyboardModifiers)(Qt::KeypadModifier|Qt::ShiftModifier);
}
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 9dc18e0..3559b15 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -104,6 +104,7 @@ private slots:
void setFixedWidth();
void deleteActionInTriggered();
void pushButtonPopulateOnAboutToShow();
+ void QTBUG7907_submenus_autoselect();
protected slots:
void onActivated(QAction*);
void onHighlighted(QAction*);
@@ -930,6 +931,22 @@ void tst_QMenu::pushButtonPopulateOnAboutToShow()
QVERIFY(!lastMenu->geometry().intersects(b.geometry()));
}
+void tst_QMenu::QTBUG7907_submenus_autoselect()
+{
+ QMenu menu("Test Menu");
+ QMenu set1("Setting1");
+ QMenu set2("Setting2");
+ QMenu subset("Subsetting");
+ subset.addAction("Values");
+ set1.addMenu(&subset);
+ menu.addMenu(&set1);
+ menu.addMenu(&set2);
+ menu.show();
+ QTest::qWaitForWindowShown(&menu);
+ QTest::mouseClick(&menu, Qt::LeftButton, Qt::NoModifier, QPoint(5,5) );
+ QTest::qWait(500);
+ QVERIFY(!subset.isVisible());
+}
QTEST_MAIN(tst_QMenu)