summaryrefslogtreecommitdiffstats
path: root/PCbuild8/rt.bat
blob: 2e0aba33f2dbafd047fb213c078d2ed14640d1a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@echo off
rem Run Tests.  Run the regression test suite.

rem Usage:  rt [-d] [-O] [-q] regrtest_args

rem -d   Run Debug build (python_d.exe).  Else release build.

rem -O   Run python.exe or python_d.exe (see -d) with -O.

rem -q   "quick" -- normally the tests are run twice, the first time

rem      after deleting all the .py[co] files reachable from Lib/.

rem      -q runs the tests just once, and without deleting .py[co] files.

rem All leading instances of these switches are shifted off, and

rem whatever remains is passed to regrtest.py.  For example,

rem     rt -O -d -x test_thread

rem runs

rem     python_d -O ../lib/test/regrtest.py -x test_thread

rem twice, and

rem     rt -q -g test_binascii

rem runs

rem     python_d ../lib/test/regrtest.py -g test_binascii

rem to generate the expected-output file for binascii quickly.

rem

rem Confusing:  if you want to pass a comma-separated list, like

rem     -u network,largefile

rem then you have to quote it on the rt line, like

rem     rt -u "network,largefile"


setlocal

set exe=python
set qmode=
set dashO=
PATH %PATH%;..\..\tcltk\bin

:CheckOpts
if "%1"=="-O" (set dashO=-O)     & shift & goto CheckOpts

if "%1"=="-q" (set qmode=yes)    & shift & goto CheckOpts
if "%1"=="-d" (set exe=python_d) & shift & goto CheckOpts



set cmd=%exe% %dashO% -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9

if defined qmode goto Qmode



echo Deleting .pyc/.pyo files ...

%exe% rmpyc.py



echo on

%cmd%

@echo off



echo About to run again without deleting .pyc/.pyo first:

pause



:Qmode

echo on

%cmd%

a href='/oss-git/Qt.git/diff/doc/src/examples/basicgraphicslayouts.qdoc?h=v4.8.7&id=cbec6d9481bf8f55834eafac4eca53f85206b240'>doc/src/examples/basicgraphicslayouts.qdoc55
-rw-r--r--doc/src/examples/extension.qdoc11
-rw-r--r--doc/src/images/extension-example.pngbin7676 -> 9929 bytes-rw-r--r--doc/src/images/extension_more.pngbin9309 -> 13523 bytes-rw-r--r--doc/src/images/qtransform-representation.pngbin17892 -> 17385 bytes-rw-r--r--doc/src/phonon-api.qdoc2
-rw-r--r--doc/src/phonon.qdoc2
-rw-r--r--doc/src/platform-notes.qdoc1
-rw-r--r--doc/src/porting4-removedvirtual.qdocinc2
-rw-r--r--doc/src/qalgorithms.qdoc5
-rw-r--r--doc/src/qmake-manual.qdoc10
-rw-r--r--doc/src/qnamespace.qdoc6
-rw-r--r--doc/src/qprintdialog.qdoc32
-rw-r--r--doc/src/snippets/code/src_corelib_global_qglobal.cpp8
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_util_qdesktopservices.cpp5
-rw-r--r--doc/src/tutorials/addressbook-sdk.qdoc179
-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.cpp50
-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.h12
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.cpp210
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.h77
-rw-r--r--examples/graphicsview/flowlayout/flowlayout.pro12
-rw-r--r--examples/graphicsview/flowlayout/main.cpp (renamed from src/plugins/kbddrivers/linuxis/linuxiskbdhandler.h)51
-rw-r--r--examples/graphicsview/flowlayout/window.cpp63
-rw-r--r--examples/graphicsview/flowlayout/window.h (renamed from src/plugins/kbddrivers/linuxis/linuxiskbddriverplugin.h)18
-rw-r--r--mkspecs/features/moc.prf5
-rw-r--r--mkspecs/features/uic.prf5
-rw-r--r--qmake/generators/makefile.cpp12
-rw-r--r--qmake/generators/makefile.h6
-rw-r--r--qmake/generators/metamakefile.cpp2
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp6
-rw-r--r--qmake/project.cpp2
-rw-r--r--src/3rdparty/phonon/qt7/audionode.mm16
-rw-r--r--src/3rdparty/phonon/qt7/backendinfo.mm1
-rw-r--r--src/3rdparty/phonon/qt7/quicktimevideoplayer.h1
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebview.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog22
-rw-r--r--src/activeqt/container/qaxbase.cpp12
-rw-r--r--src/corelib/global/qglobal.cpp44
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/io/qdiriterator.cpp38
-rw-r--r--src/corelib/io/qfile.cpp22
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp2
-rw-r--r--src/corelib/io/qiodevice.cpp8
-rw-r--r--src/corelib/io/qprocess.cpp34
-rw-r--r--src/corelib/io/qtextstream.cpp11
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp8
-rw-r--r--src/corelib/kernel/qmetaobject.cpp18
-rw-r--r--src/corelib/kernel/qmetatype.cpp2
-rw-r--r--src/corelib/kernel/qobject.cpp20
-rw-r--r--src/corelib/thread/qthread.cpp12
-rw-r--r--src/corelib/tools/qlinkedlist.cpp4
-rw-r--r--src/corelib/tools/qlistdata.cpp4
-rw-r--r--src/corelib/tools/qstring.cpp3
-rw-r--r--src/gui/dialogs/qcolordialog.cpp8
-rw-r--r--src/gui/dialogs/qfiledialog.cpp27
-rw-r--r--src/gui/dialogs/qfiledialog_p.h39
-rw-r--r--src/gui/dialogs/qmessagebox.cpp32
-rw-r--r--src/gui/embedded/embedded.pri19
-rw-r--r--src/gui/embedded/qkbd_defaultmap_qws_p.h744
-rw-r--r--src/gui/embedded/qkbd_qws.cpp481
-rw-r--r--src/gui/embedded/qkbd_qws.h22
-rw-r--r--src/gui/embedded/qkbd_qws_p.h77
-rw-r--r--src/gui/embedded/qkbddriverfactory_qws.cpp14
-rw-r--r--src/gui/embedded/qkbdlinuxinput_qws.cpp241
-rw-r--r--src/gui/embedded/qkbdlinuxinput_qws.h (renamed from src/gui/embedded/qkbdusb_qws.h)24
-rw-r--r--src/gui/embedded/qkbdsl5000_qws.cpp25
-rw-r--r--src/gui/embedded/qkbdsl5000_qws.h19
-rw-r--r--src/gui/embedded/qkbdtty_qws.cpp300
-rw-r--r--src/gui/embedded/qkbdtty_qws.h8
-rw-r--r--src/gui/embedded/qkbdum_qws.cpp9
-rw-r--r--src/gui/embedded/qkbdusb_qws.cpp401
-rw-r--r--src/gui/embedded/qscreen_qws.cpp8
-rw-r--r--src/gui/embedded/qwscommand_qws.cpp1
-rw-r--r--src/gui/embedded/qwssignalhandler.cpp6
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp17
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp11
-rw-r--r--src/gui/image/qimage.cpp16
-rw-r--r--src/gui/inputmethod/qinputcontext_p.h4
-rw-r--r--src/gui/inputmethod/qwininputcontext_p.h1
-rw-r--r--src/gui/inputmethod/qwininputcontext_win.cpp11
-rw-r--r--src/gui/inputmethod/qwsinputcontext_p.h1
-rw-r--r--src/gui/inputmethod/qwsinputcontext_qws.cpp11
-rw-r--r--src/gui/inputmethod/qximinputcontext_x11.cpp4
-rw-r--r--src/gui/itemviews/qtableview.cpp331
-rw-r--r--src/gui/itemviews/qtableview_p.h98
-rw-r--r--src/gui/itemviews/qtreeview.cpp1
-rw-r--r--src/gui/kernel/qapplication.cpp15
-rw-r--r--src/gui/kernel/qapplication_qws.cpp9
-rw-r--r--src/gui/kernel/qapplication_x11.cpp13
-rw-r--r--src/gui/kernel/qt_mac.cpp45
-rw-r--r--src/gui/kernel/qwidget.cpp61
-rw-r--r--src/gui/kernel/qwidget_mac.mm12
-rw-r--r--src/gui/kernel/qwidget_p.h2
-rw-r--r--src/gui/kernel/qwidget_x11.cpp3
-rw-r--r--src/gui/math3d/qfixedpt.cpp32
-rw-r--r--src/gui/math3d/qfixedpt.h32
-rw-r--r--src/gui/math3d/qgenericmatrix.cpp32
-rw-r--r--src/gui/math3d/qgenericmatrix.h32
-rw-r--r--src/gui/math3d/qmath3dglobal.h32
-rw-r--r--src/gui/math3d/qmath3dutil.cpp32
-rw-r--r--src/gui/math3d/qmath3dutil_p.h32
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp32
-rw-r--r--src/gui/math3d/qmatrix4x4.h32
-rw-r--r--src/gui/math3d/qquaternion.cpp32
-rw-r--r--src/gui/math3d/qquaternion.h32
-rw-r--r--src/gui/math3d/qvector2d.cpp32
-rw-r--r--src/gui/math3d/qvector2d.h32
-rw-r--r--src/gui/math3d/qvector3d.cpp32
-rw-r--r--src/gui/math3d/qvector3d.h32
-rw-r--r--src/gui/math3d/qvector4d.cpp32
-rw-r--r--src/gui/math3d/qvector4d.h32
-rw-r--r--src/gui/painting/qdrawhelper.cpp1004
-rw-r--r--src/gui/painting/qpaintengine_alpha.cpp12
-rw-r--r--src/gui/painting/qpaintengine_alpha_p.h1
-rw-r--r--src/gui/painting/qpainter.cpp2
-rw-r--r--src/gui/painting/qpdf.cpp5
-rw-r--r--src/gui/painting/qprintengine_win.cpp2
-rw-r--r--src/gui/painting/qprinter.cpp2
-rw-r--r--src/gui/painting/qregion.cpp22
-rw-r--r--src/gui/painting/qtransform.cpp19
-rw-r--r--src/gui/styles/gtksymbols.cpp68
-rw-r--r--src/gui/styles/gtksymbols_p.h11
-rw-r--r--src/gui/styles/qgtkstyle.cpp50
-rw-r--r--src/gui/styles/qmacstyle_mac.mm7
-rw-r--r--src/gui/styles/qstylehelper.cpp18
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp26
-rw-r--r--src/gui/text/qfontdatabase_qws.cpp5
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
-rw-r--r--src/gui/text/qfontengine_mac.mm31
-rw-r--r--src/gui/text/qfontengine_p.h2
-rw-r--r--src/gui/text/qfontengine_qpf.cpp12
-rw-r--r--src/gui/text/qfontengine_qws.cpp2
-rw-r--r--src/gui/util/qcompleter.cpp7
-rw-r--r--src/gui/util/qdesktopservices.cpp5
-rw-r--r--src/gui/widgets/qcombobox.cpp2
-rw-r--r--src/gui/widgets/qcombobox_p.h2
-rw-r--r--src/network/access/qhttp.cpp6
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp36
-rw-r--r--src/network/access/qnetworkcookie.cpp466
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp44
-rw-r--r--src/network/kernel/qnetworkinterface_win.cpp6
-rw-r--r--src/opengl/qgl_cl_p.h2
-rw-r--r--src/opengl/qglframebufferobject.cpp4
-rw-r--r--src/opengl/qglpixelbuffer_egl.cpp8
-rw-r--r--src/opengl/qglpixelbuffer_win.cpp2
-rw-r--r--src/opengl/qpaintengine_opengl.cpp44
-rw-r--r--src/opengl/qwindowsurface_gl.cpp4
-rw-r--r--src/plugins/gfxdrivers/directfb/directfb.pro1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.cpp30
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h11
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp66
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp16
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbsurface.cpp25
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbsurface.h8
-rw-r--r--src/plugins/gfxdrivers/powervr/README3
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp2
-rw-r--r--src/plugins/kbddrivers/kbddrivers.pro3
-rw-r--r--src/plugins/kbddrivers/linuxinput/linuxinput.pro14
-rw-r--r--src/plugins/kbddrivers/linuxinput/main.cpp (renamed from src/plugins/kbddrivers/usb/main.cpp)22
-rw-r--r--src/plugins/kbddrivers/linuxis/README1
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxis.pro11
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxiskbddriverplugin.cpp87
-rw-r--r--src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp171
-rw-r--r--src/plugins/kbddrivers/usb/usb.pro14
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp6
-rw-r--r--src/svg/qsvghandler.cpp12
-rw-r--r--src/svg/qsvgstyle.cpp13
-rw-r--r--src/svg/qsvgstyle_p.h11
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/math3d/qfixedpt/tst_qfixedpt.cpp32
-rw-r--r--tests/auto/math3d/qmatrixnxn/tst_qmatrixnxn.cpp32
-rw-r--r--tests/auto/math3d/qquaternion/tst_qquaternion.cpp32
-rw-r--r--tests/auto/math3d/qvectornd/tst_qvectornd.cpp32
-rw-r--r--tests/auto/math3d/shared/math3dincludes.cpp32
-rw-r--r--tests/auto/math3d/shared/math3dincludes.h32
-rw-r--r--tests/auto/moc/forgotten-qinterface.h2
-rw-r--r--tests/auto/moc/tst_moc.cpp56
-rw-r--r--tests/auto/q3sqlcursor/tst_q3sqlcursor.cpp20
-rw-r--r--tests/auto/q3sqlselectcursor/tst_q3sqlselectcursor.cpp12
-rw-r--r--tests/auto/qcompleter/tst_qcompleter.cpp58
-rw-r--r--tests/auto/qfile/rename-fallback.qrc5
-rw-r--r--tests/auto/qfile/test/test.pro2
-rw-r--r--tests/auto/qfile/tst_qfile.cpp46
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp47
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp25
-rw-r--r--tests/auto/qmake/qmake.pro2
-rw-r--r--tests/auto/qmake/testcompiler.cpp305
-rw-r--r--tests/auto/qmake/testcompiler.h49
-rw-r--r--tests/auto/qmake/testdata/shadow_files_build/README2
-rw-r--r--tests/auto/qmake/tst_qmake.cpp34
-rw-r--r--tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp295
-rw-r--r--tests/auto/qprocess/tst_qprocess.cpp26
-rw-r--r--tests/auto/qsqldatabase/tst_databases.h39
-rw-r--r--tests/auto/qsqldatabase/tst_qsqldatabase.cpp194
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp95
-rw-r--r--tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp12
-rw-r--r--tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp167
-rw-r--r--tests/auto/qsqlthread/tst_qsqlthread.cpp10
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp5
-rw-r--r--tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp26
-rw-r--r--tests/auto/qtextstream/tst_qtextstream.cpp4
-rw-r--r--tests/benchmarks/qtableview/qtableview.pro6
-rw-r--r--tests/benchmarks/qtableview/tst_qtableview.cpp193
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp114
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene_p.h15
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp408
-rw-r--r--tools/assistant/tools/assistant/contentwindow.cpp60
-rw-r--r--tools/assistant/tools/assistant/contentwindow.h2
-rw-r--r--tools/assistant/tools/assistant/helpviewer.cpp83
-rw-r--r--tools/assistant/tools/assistant/helpviewer.h1
-rw-r--r--tools/assistant/tools/assistant/indexwindow.cpp63
-rw-r--r--tools/assistant/tools/assistant/indexwindow.h2
-rw-r--r--tools/configure/tools.cpp76
-rw-r--r--tools/configure/tools.h41
-rw-r--r--tools/designer/src/lib/shared/plugindialog_p.h11
-rw-r--r--tools/designer/src/lib/shared/qtresourceview.cpp189
-rw-r--r--tools/designer/src/lib/shared/qtresourceview_p.h1
-rw-r--r--tools/kmap2qmap/kmap2qmap.pro12
-rw-r--r--tools/kmap2qmap/main.cpp948
-rw-r--r--tools/linguist/lconvert/main.cpp2
-rw-r--r--tools/linguist/linguist/formpreviewview.cpp2
-rw-r--r--tools/linguist/linguist/main.cpp13
-rw-r--r--tools/linguist/linguist/mainwindow.cpp2
-rw-r--r--tools/linguist/linguist/messageeditor.cpp2
-rw-r--r--tools/linguist/linguist/messagemodel.cpp10
-rw-r--r--tools/linguist/linguist/phrase.cpp2
-rw-r--r--tools/linguist/lrelease/main.cpp15
-rw-r--r--tools/linguist/lupdate/cpp.cpp4
-rw-r--r--tools/linguist/lupdate/main.cpp1
-rw-r--r--tools/linguist/shared/profileevaluator.cpp25
-rw-r--r--tools/linguist/shared/qm.cpp1
-rw-r--r--tools/linguist/shared/translator.cpp58
-rw-r--r--tools/linguist/shared/translator.h5
-rw-r--r--tools/linguist/shared/translatormessage.h26
-rw-r--r--tools/linguist/shared/ts.cpp6
-rw-r--r--tools/qdoc3/test/qt-api-only.qdocconf2
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf6
-rw-r--r--tools/tools.pro2
-rwxr-xr-xutil/webkit/mkdist-webkit41
254 files changed, 8190 insertions, 3495 deletions
diff --git a/config.tests/unix/opengles1/opengles1.pro b/config.tests/unix/opengles1/opengles1.pro
index d800a5d..ad8dd31 100644
--- a/config.tests/unix/opengles1/opengles1.pro
+++ b/config.tests/unix/opengles1/opengles1.pro
@@ -6,4 +6,4 @@ for(p, QMAKE_LIBDIR_OPENGL) {
}
CONFIG -= qt
-LIBS += $$QMAKE_LIBS_OPENGL
+LIBS += $$QMAKE_LIBS_OPENGL_QT
diff --git a/config.tests/unix/opengles1cl/opengles1cl.pro b/config.tests/unix/opengles1cl/opengles1cl.pro
index c9addf9..415cdbb 100644
--- a/config.tests/unix/opengles1cl/opengles1cl.pro
+++ b/config.tests/unix/opengles1cl/opengles1cl.pro
@@ -6,4 +6,4 @@ for(p, QMAKE_LIBDIR_OPENGL) {
}
CONFIG -= qt
-LIBS += $$QMAKE_LIBS_OPENGL
+LIBS += $$QMAKE_LIBS_OPENGL_QT
diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro
index 13f95a1..0dfae42 100644
--- a/config.tests/unix/opengles2/opengles2.pro
+++ b/config.tests/unix/opengles2/opengles2.pro
@@ -6,4 +6,4 @@ for(p, QMAKE_LIBDIR_OPENGL) {
}
CONFIG -= qt
-LIBS += $$QMAKE_LIBS_OPENGL
+LIBS += $$QMAKE_LIBS_OPENGL_QT
diff --git a/config.tests/x11/xlib/xlib.cpp b/config.tests/x11/xlib/xlib.cpp
new file mode 100644
index 0000000..8d25bf5
--- /dev/null
+++ b/config.tests/x11/xlib/xlib.cpp
@@ -0,0 +1,9 @@
+#include <X11/Xlib.h>
+
+int main(int, char **)
+{
+ Display *d = XOpenDisplay(NULL);
+ XCloseDisplay(d);
+ return 0;
+}
+
diff --git a/config.tests/x11/xlib/xlib.pro b/config.tests/x11/xlib/xlib.pro
new file mode 100644
index 0000000..658161e
--- /dev/null
+++ b/config.tests/x11/xlib/xlib.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xlib.cpp
diff --git a/configure b/configure
index f0b7f90..f87f79c 100755
--- a/configure
+++ b/configure
@@ -601,7 +601,7 @@ CFG_GFX_ON="linuxfb multiscreen"
CFG_GFX_PLUGIN_AVAILABLE=
CFG_GFX_PLUGIN=
CFG_GFX_OFF=
-CFG_KBD_AVAILABLE="tty usb sl5000 yopy vr41xx qvfb"
+CFG_KBD_AVAILABLE="tty linuxinput sl5000 yopy vr41xx qvfb"
CFG_KBD_ON="tty" #default, see QMakeVar above
CFG_MOUSE_AVAILABLE="pc bus linuxtp yopy vr41xx tslib qvfb"
CFG_MOUSE_ON="pc linuxtp" #default, see QMakeVar above
@@ -4727,6 +4727,14 @@ if [ "$PLATFORM_X11" = "yes" ]; then
X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"
fi
+ # Check we actually have X11 :-)
+ if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ echo "Basic XLib functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}."
+ exit 1
+ fi
+
# auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es1cl = ES 1.x common lite, es2 = OpenGL ES 2.x)
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
@@ -6177,6 +6185,9 @@ TARGET_OPERATING_SYSTEM=`echo $XPLATFORM | cut -f 2- -d/ | cut -f -1 -d-`
# when cross-compiling, don't include build-host information (build key is target specific)
QT_BUILD_KEY="$CFG_USER_BUILD_KEY $CFG_ARCH $TARGET_OPERATING_SYSTEM $COMPILER $BUILD_OPTIONS"
+if [ -n "$QT_NAMESPACE" ]; then
+ QT_BUILD_KEY="$QT_BUILD_KEY $QT_NAMESPACE"
+fi
MAC_NEED_TWO_BUILD_KEYS="no"
if [ "$PLATFORM_MAC" = "yes" -a "$CFG_MAC_COCOA" = "yes" ]; then
QT_BUILD_KEY_CARBON=$QT_BUILD_KEY
diff --git a/configure.exe b/configure.exe
index 54e8a60..13ca0e5 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/dist/changes-4.5.1 b/dist/changes-4.5.1
index 4e3fcc7..1d2286e 100644
--- a/dist/changes-4.5.1
+++ b/dist/changes-4.5.1
@@ -80,7 +80,14 @@ Qt for Windows CE
- Designer
-
+ * [249097] Fixed a crash related to undoing a QGridLayout re-layouting
+ operation.
+ * [247995] Fixed a crash occurring after layout operations that cause
+ an instance of QGridLayout or QFormLayout to shrink.
+ * [248000] Fixed a crash ocurring when re-layouting empty grid layouts.
+ * [245961] Restricted objectname-validation to known object name
+ properties only.
+ * [245503] Fixed redundant backslashes in string property in property browser.
- Linguist
- Linguist GUI
@@ -97,7 +104,11 @@ Qt for Windows CE
- uic
-
+ * [244998] Fixed include file generation for phonon widgets.
+ * [248070] Fixed code generation for QStringList-type properties to use
+ encoding properly.
+ * [242447] Made uic generate class-specific code correctly in the case
+ of multiple levels of inheritance.
- uic3
diff --git a/doc/src/deployment.qdoc b/doc/src/deployment.qdoc
index 7e02f1a..d9f7c1a 100644
--- a/doc/src/deployment.qdoc
+++ b/doc/src/deployment.qdoc
@@ -91,7 +91,7 @@
The disadvantage with the shared library approach is that you
will get more files to deploy. For more information, see
\l{sharedlibrary.html}{Creating Shared Libraries}.
-
+
\section1 Deploying Qt's Libraries
\table
@@ -111,13 +111,14 @@
\o \l {QtNetwork}
\o \l {QtOpenGL}
\o \l {QtScript}
- \o \l {QtSql}
+ \o \l {QtScriptTools}
\row
+ \o \l {QtSql}
\o \l {QtSvg}
\o \l {QtWebKit}
\o \l {QtXml}
- \o \l {QtXmlPatterns}
\row
+ \o \l {QtXmlPatterns}
\o \l {Phonon Module}{Phonon}
\o \l {Qt3Support}
\endtable
@@ -178,11 +179,13 @@
Please see \l{QtWebKit Module#License Information}{the QtWebKit module
documentation} for more information.
- \row \o Phonon \o Phonon
+ \row \o \l{Phonon Module}{Phonon} \o Phonon
\o Phonon relies on the native multimedia engines on different platforms.
Phonon itself is licensed under the GNU LGPL version 2. Please see
\l{Phonon Module#License Information}{the Phonon module documentation}
- for more information.
+ for more information on licensing and the
+ \l{Phonon Overview#Backends}{Phonon Overview} for details of the backends
+ in use on different platforms.
\endtable
\section1 Platform-Specific Notes
diff --git a/doc/src/diagrams/qtransform-representation.sk b/doc/src/diagrams/qtransform-representation.sk
new file mode 100644
index 0000000..17dcbfe
--- /dev/null
+++ b/doc/src/diagrams/qtransform-representation.sk
@@ -0,0 +1,103 @@
+##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,190,760)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,190,695)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,190,630)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,320,760)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,320,695)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,320,630)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,255,760)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,255,695)
+lp((0,0,1))
+lw(2)
+r(65,0,0,-65,255,630)
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m33',(329.16,589.968))
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('dy',(274.828,577.768))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m32',(264.16,602.768))
+G_()
+G()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m31',(199.16,602.768))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('dx',(209.828,577.8))
+G_()
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m11',(199.16,719.968))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m12',(264.16,719.968))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m13',(329.16,719.968))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m21',(199.16,654.968))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m22',(264.16,654.968))
+fp((0,0,0))
+le()
+lw(1)
+Fn('Helvetica')
+Fs(24)
+txt('m23',(329.16,654.968))
+guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,5,5),1,(0,0,1),'Grid')
diff --git a/doc/src/examples/basicgraphicslayouts.qdoc b/doc/src/examples/basicgraphicslayouts.qdoc
index 92571af..9696fb6 100644
--- a/doc/src/examples/basicgraphicslayouts.qdoc
+++ b/doc/src/examples/basicgraphicslayouts.qdoc
@@ -45,6 +45,7 @@
The Basic Graphics Layouts example shows how to use the layout classes
in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout.
+ In addition to that it shows how to write your own custom layout item.
\image basicgraphicslayouts-example.png Screenshot of the Basic Layouts Example
@@ -115,26 +116,24 @@
\section1 LayoutItem Class Definition
- The \c LayoutItem class is a subclass of QGraphicsWidget. It has a
- constructor, a destructor, and a reimplementation of the
- {QGraphicsItem::paint()}{paint()} function.
+ The \c LayoutItem class is a subclass of QGraphicsLayoutItem and
+ QGraphicsItem. It has a constructor, a destructor, and some required
+ reimplementations.
+ Since it inherits QGraphicsLayoutItem it must reimplement
+ {QGraphicsLayoutItem::setGeometry()}{setGeometry()} and
+ {QGraphicsLayoutItem::sizeHint()}{sizeHint()}.
+ In addition to that it inherits QGraphicsItem, so it must reimplement
+ {QGraphicsItem::boundingRect()}{boundingRect()} and
+ {QGraphicsItem::paint()}{paint()}.
\snippet examples/graphicsview/basicgraphicslayouts/layoutitem.h 0
- The \c LayoutItem class also has a private instance of QPixmap, \c pix.
-
- \note We subclass QGraphicsWidget so that \c LayoutItem objects can
- be automatically plugged into a layout, as QGraphicsWidget is a
- specialization of QGraphicsLayoutItem.
+ The \c LayoutItem class also has a private instance of QPixmap, \c m_pix.
\section1 LayoutItem Class Implementation
- In \c{LayoutItem}'s constructor, \c pix is instantiated and the
- \c{QT_original_R.png} image is loaded into it. We set the size of
- \c LayoutItem to be slightly larger than the size of the pixmap as we
- require some space around it for borders that we will paint later.
- Alternatively, you could scale the pixmap to prevent the item from
- becoming smaller than the pixmap.
+ In \c{LayoutItem}'s constructor, \c m_pix is instantiated and the
+ \c{block.png} image is loaded into it.
\snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 0
@@ -148,4 +147,32 @@
\snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 2
+ The reimplementation of {QGraphicsItem::boundingRect()}{boundingRect()}
+ will set the top left corner at (0,0), and the size of it will be
+ the size of the layout items
+ {QGraphicsLayoutItem::geometry()}{geometry()}. This is the area that
+ we paint within.
+
+ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 3
+
+
+ The reimplementation of {QGraphicsLayoutItem::setGeometry()}{setGeometry()}
+ simply calls its baseclass implementation. However, since this will change
+ the boundingRect we must also call
+ {QGraphicsItem::prepareGeometryChange()}{prepareGeometryChange()}.
+ Finally, we move the item according to \c geom.topLeft().
+
+ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 4
+
+
+ Since we don't want the size of the item to be smaller than the pixmap, we
+ must make sure that we return a size hint that is larger than \c m_pix.
+ We also add some extra space around for borders that we will paint later.
+ Alternatively, you could scale the pixmap to prevent the item from
+ becoming smaller than the pixmap.
+ The preferred size is the same as the minimum size hint, while we set
+ maximum to be a large value
+
+ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 5
+
*/ \ No newline at end of file
diff --git a/doc/src/examples/extension.qdoc b/doc/src/examples/extension.qdoc
index 8a0ca3a..02e0698 100644
--- a/doc/src/examples/extension.qdoc
+++ b/doc/src/examples/extension.qdoc
@@ -80,9 +80,9 @@
user type a word to search for, we need several \l
{QCheckBox}{QCheckBox}es to facilitate the search options, and we
need three \l {QPushButton}{QPushButton}s: the \gui Find button to
- start a search, the \gui More button to enable an advanced search,
- and the \gui Close button to exit the application. Finally, we
- need a QWidget representing the application's extension part.
+ start a search and the \gui More button to enable an advanced search.
+ Finally, we need a QWidget representing the application's extension
+ part.
\section1 FindDialog Class Implementation
@@ -128,8 +128,7 @@
the connection makes sure that the extension widget is shown
depending on the state of \gui More button.
- We also connect the \gui Close button to the QWidget::close()
- slot, and we put the checkboxes associated with the advanced
+ We also put the check boxes associated with the advanced
search options into a layout we install on the extension widget.
\snippet examples/dialogs/extension/finddialog.cpp 4
@@ -137,7 +136,7 @@
Before we create the main layout, we create several child layouts
for the widgets: First we allign the QLabel ans its buddy, the
QLineEdit, using a QHBoxLayout. Then we vertically allign the
- QLabel and QLineEdit with the checkboxes associated with the
+ QLabel and QLineEdit with the check boxes associated with the
simple search, using a QVBoxLayout. We also create a QVBoxLayout
for the buttons. In the end we lay out the two latter layouts and
the extension widget using a QGridLayout.
diff --git a/doc/src/images/extension-example.png b/doc/src/images/extension-example.png
index dfaacc0..18fab52 100644
--- a/doc/src/images/extension-example.png
+++ b/doc/src/images/extension-example.png
Binary files differ
diff --git a/doc/src/images/extension_more.png b/doc/src/images/extension_more.png
index 2b06809..407af27 100644
--- a/doc/src/images/extension_more.png
+++ b/doc/src/images/extension_more.png
Binary files differ
diff --git a/doc/src/images/qtransform-representation.png b/doc/src/images/qtransform-representation.png
index 2608872..883d5dc 100644
--- a/doc/src/images/qtransform-representation.png
+++ b/doc/src/images/qtransform-representation.png
Binary files differ
diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc
index 147ded3..3d04c68 100644
--- a/doc/src/phonon-api.qdoc
+++ b/doc/src/phonon-api.qdoc
@@ -2568,7 +2568,7 @@
details.
Phonon also provides EffectWidget, which lets the user modify the
- parameters of an effect an the fly, e.g., with comboboxes.
+ parameters of an effect an the fly; e.g., with combo boxes.
\sa {Phonon Module}, EffectWidget
*/
diff --git a/doc/src/phonon.qdoc b/doc/src/phonon.qdoc
index fa84b96..9470e61 100644
--- a/doc/src/phonon.qdoc
+++ b/doc/src/phonon.qdoc
@@ -49,7 +49,7 @@
\section1 Introduction
Qt uses the Phonon multimedia framework to provide functionality
- for playback of the most common multimedia formats.The media can
+ for playback of the most common multimedia formats. The media can
be read from files or streamed over a network, using a QURL to a
file.
diff --git a/doc/src/platform-notes.qdoc b/doc/src/platform-notes.qdoc
index d5eee27..6532d1e 100644
--- a/doc/src/platform-notes.qdoc
+++ b/doc/src/platform-notes.qdoc
@@ -493,7 +493,6 @@
\row
\row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X}
\row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
- \row \o MIPSpro 7.4.2m \o{5,1} \e{Unsupported - see the Unsupported Platforms table}
\row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X}
\row \o \l{Known Issues in %VERSION%}{Intel CC 10 (see note)}
\o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X}
diff --git a/doc/src/porting4-removedvirtual.qdocinc b/doc/src/porting4-removedvirtual.qdocinc
index 3eedad2..1af4fa6 100644
--- a/doc/src/porting4-removedvirtual.qdocinc
+++ b/doc/src/porting4-removedvirtual.qdocinc
@@ -22,7 +22,7 @@
\row \o void QButton::drawButtonLabel(QPainter *) \o Use Q3Button instead or reimplement QButton::paintEvent().
\row \o void QButton::setAccel(const QKeySequence &) \o Setter.
\row \o void QButton::setAutoRepeat(bool) \o Setter.
-\row \o void QButton::setDown(bool) \o Setter.
+\row \o void QButton::setDown(bool) \o Use Q3Button instead or reimplement or port to the new QPushButton API.
\row \o void QButton::setPixmap(const QPixmap &) \o Setter.
\row \o void QButton::setState(ToggleState) \o Setter.
\row \o void QButton::setText(const QString &) \o Use the QAbstractButton::setText() setter function.
diff --git a/doc/src/qalgorithms.qdoc b/doc/src/qalgorithms.qdoc
index 459fb81..b33c250 100644
--- a/doc/src/qalgorithms.qdoc
+++ b/doc/src/qalgorithms.qdoc
@@ -490,7 +490,10 @@ of \a value in the variable passed as a reference in argument \a n.
\overload
- This is the same as qLowerBound(\a{container}.begin(), \a{container}.end(), value);
+ For read-only iteration over containers, this function is broadly equivalent to
+ qLowerBound(\a{container}.begin(), \a{container}.end(), value). However, since it
+ returns a const iterator, you cannot use it to modify the container; for example,
+ to insert items.
*/
/*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value)
diff --git a/doc/src/qmake-manual.qdoc b/doc/src/qmake-manual.qdoc
index 30da8c6..39581a2 100644
--- a/doc/src/qmake-manual.qdoc
+++ b/doc/src/qmake-manual.qdoc
@@ -367,15 +367,20 @@
\row \o debug \o The project is to be built in debug mode.
\row \o debug_and_release \o The project is built in \e both debug and
release modes.
+ \row \o debug_and_release_target \o The project is built in \e both debug
+ and release modes. TARGET is built into \e both the debug and release directories.
\row \o build_all \o If \c debug_and_release is specified, the project is
built in both debug and release modes by default.
+ \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes
+ the precompiled header file specified in the .pro file.
\row \o ordered \o When using the \c subdirs template, this option
specifies that the directories listed should be processed in the
order in which they are given.
\row \o warn_on \o The compiler should output as many warnings as possible.
This is ignored if \c warn_off is specified.
\row \o warn_off \o The compiler should output as few warnings as possible.
- \endtable
+ \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files.
+ \endtable
The \c debug_and_release option is special in that it enables \e both debug and
release versions of a project to be built. In such a case, the Makefile that
@@ -3075,6 +3080,9 @@
called \c{.qmake.cache} in parent directories of the current directory. If
it fails to find this file, it will silently ignore this step of processing.
+ If it finds a \c{.qmake.cache} file then it will process this file first before
+ it processes the project file.
+
\target LibDepend
\section1 Library Dependencies
diff --git a/doc/src/qnamespace.qdoc b/doc/src/qnamespace.qdoc
index 07972af..a99e434 100644
--- a/doc/src/qnamespace.qdoc
+++ b/doc/src/qnamespace.qdoc
@@ -508,11 +508,11 @@
\value DirectConnection When emitted, the signal is immediately delivered to the slot.
\value QueuedConnection When emitted, the signal is queued until the event loop is
able to deliver it to the slot.
- \value
- BlockingQueuedConnection Same as QueuedConnection, except that the current thread blocks
+ \value BlockingQueuedConnection
+ Same as QueuedConnection, except that the current thread blocks
until the slot has been delivered. This connection type should
only be used for receivers in a different thread. Note that misuse
- of this type can lead to dead locks in your application.
+ of this type can lead to deadlocks in your application.
\value AutoConnection If the signal is emitted from the thread
in which the receiving object lives, the
slot is invoked directly, as with
diff --git a/doc/src/qprintdialog.qdoc b/doc/src/qprintdialog.qdoc
index 6cac1c9..a4cd18b 100644
--- a/doc/src/qprintdialog.qdoc
+++ b/doc/src/qprintdialog.qdoc
@@ -39,26 +39,34 @@
**
****************************************************************************/
+#ifdef QT3_SUPPORT
/*!
- \fn QPrinter *QPrintDialog::printer() const
+ \fn QPrinter *QPrintDialog::printer() const
- Returns a pointer to the printer this dialog configures, or 0 if
- this dialog does not operate on any printer.
+ Returns a pointer to the printer this dialog configures, or 0 if
+ this dialog does not operate on any printer.
+
+ This function is available for Unix platforms only.
*/
/*!
- \fn void QPrintDialog::setPrinter(QPrinter *printer, bool pickupSettings)
+ \fn void QPrintDialog::setPrinter(QPrinter *printer, bool pickupSettings)
+
+ Sets this dialog to configure printer \a printer, or no printer if \a printer
+ is null. If \a pickupSettings is true, the dialog reads most of
+ its settings from \a printer. If \a pickupSettings is false (the
+ default) the dialog keeps its old settings.
- Sets this dialog to configure printer \a printer, or no printer if \a printer
- is null. If \a pickupSettings is true, the dialog reads most of
- its settings from \a printer. If \a pickupSettings is false (the
- default) the dialog keeps its old settings.
+ This function is available for Unix platforms only.
*/
/*!
- \fn void QPrintDialog::addButton(QPushButton *button)
+ \fn void QPrintDialog::addButton(QPushButton *button)
+
+ Adds the \a button to the layout of the print dialog. The added
+ buttons are arranged from the left to the right below the
+ last groupbox of the printdialog.
- Adds the \a button to the layout of the print dialog. The added
- buttons are arranged from the left to the right below the
- last groupbox of the printdialog.
+ This function is available for Unix platforms only.
*/
+#endif
diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
index 72663e9..287181a 100644
--- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp
+++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
@@ -456,3 +456,11 @@ class MyClass : public QObject
//! [45]
QWidget w = QWidget();
//! [45]
+
+//! [46]
+ // Instead of comparing with 0.0
+ qFuzzyCompare(0.0,1.0e-200); // This will return false
+ // Compare adding 1 to both values will fix the problem
+ qFuzzyCompare(1 + 0.0, 1 + 1.0e-200); // This will return true
+//! [46]
+
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
index 355a237..783852b 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp
@@ -33,7 +33,7 @@ MyStruct s2 = var.value<MyStruct>();
//! [3]
int id = QMetaType::type("MyClass");
-if (id != -1) {
+if (id == 0) {
void *myClassPtr = QMetaType::construct(id);
...
QMetaType::destroy(id, myClassPtr);
diff --git a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
index a9c630b..5001984 100644
--- a/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
+++ b/doc/src/snippets/code/src_gui_util_qdesktopservices.cpp
@@ -11,7 +11,10 @@ public slots:
QDesktopServices::setUrlHandler("help", helpInstance, "showHelp");
//! [0]
-
//! [1]
mailto:user@foo.com?subject=Test&body=Just a test
//! [1]
+
+//! [2]
+QDesktopServices::openUrl(QUrl("file:///C:/Documents and Settings/All Users/Desktop", QUrl::TolerantMode));
+//! [2]
diff --git a/doc/src/tutorials/addressbook-sdk.qdoc b/doc/src/tutorials/addressbook-sdk.qdoc
deleted file mode 100644
index b6b257d..0000000
--- a/doc/src/tutorials/addressbook-sdk.qdoc
+++ /dev/null
@@ -1,179 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (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 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 qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page tutorials-addressbook-sdk.html
-
- \startpage {index.html}{Qt Reference Documentation}
- \nextpage \l{Designing the User Interface}{Chapter 1}
-
- \title Address Book Tutorial
- \ingroup howto
- \ingroup tutorials
- \brief An introduction to GUI programming with Qt and Qt Creator,
- describing in detail how to put together a simple yet fully-
- functioning application.
-
- This tutorial gives an introduction to GUI programming using the Qt SDK.
-
- ### Screenshot
-
- In the process, we will learn about some basic technologies provided by
- Qt, such as:
-
- \list
- \o Widgets and layout managers
- \o Container classes
- \o Signals and slots
- \o Input and output devices
- \endlist
-
- If you are completely new to Qt, please read \l{How to Learn Qt} if you
- have not already done so.
-
- The tutorial's source code is located in Qt's
- \c{examples/tutorials/addressbook} directory.
-
- Tutorial chapters:
-
- \list 1
- \o \l{Designing the User Interface}
- \o \l{Adding Addresses}
- \o \l{Navigating between Entries}
- \o \l{Editing and Removing Addresses}
- \o \l{Adding a Find Function}
- \o \l{Loading and Saving}
- \o \l{Additional Features}
- \endlist
-
- Although this little application does not look much like a fully-fledged
- modern GUI application, it uses many of the basic techniques that are used
- in more complex applications. After you have worked through it, we
- recommend checking out the \l{mainwindows/application}{Application}
- example, which presents a small GUI application, with menus, toolbars, a
- status bar, and so on.
-*/
-
-
-/*!
- \page tutorials-addressbook-sdk-part1.html
- \contentspage {Address Book Tutorial}{Contents}
- \nextpage \l{Adding Addresses}{Chapter 2}
- \title Address Book 1 - Designing the User Interface
-
- The first part of this tutorial covers the design of the basic graphical
- user interface (GUI) we use for the Address Book application.
-
- The first step to creating a GUI program is to design the user interface.
- In this chapter, our goal is to set up the labels and input fields needed
- to implement a basic address book application. The figure below is a
- screenshot of our expected output.
-
- \image addressbook-tutorial-part1-screenshot.png
-
- We begin by launching Qt Creator and use it to generate a new project. To
- do this, select \gui New from the \gui File menu. In the
- \gui{New File or Project} dialog. Follow the step by step guide on how to
- create a \gui Project with Qt Creator, refer to the document
- \l{Creating a Project in Qt Creator}{here}. Ensure that you select QWidget
- as your subclass and name it \c AddressBook.
-
- There are five files generated in this \gui{Project}:
-
- \list
- \o \c{addressbook.pro} - the project file,
- \o \c{addressbook.h} - the definition file for the \c AddressBook
- class,
- \o \c{addressbook.cpp} - the implementation file for the
- \c AddressBook class,
- \o \c{main.cpp} - the file containing a \c main() function, with an
- instance of \c AddressBook, and
- \o \c{addressbook.ui} - the user interface file created with \QD.
- \endlist
-
- Now we have all the files we need, let's move on to designing the user
- interface.
-
- \section1 Placing the Widgets on the Form
-
- In the \gui{Project Sidebar}, double-click on the \c{addressbook.ui} file.
- The \QD plugin will be launched, allowing you to design your program's user
- interface.
-
- We require two \l{QLabel}s to label the input fields as well as a
- QLineEdit and a QTextEdit as the input fields. So, drag those widgets from
- the \gui{Widget Box} to your form. In the \gui{Property Editor}, set their
- \gui{objectName} property to \c nameLabel and \c addressLabel for the
- \l{QLabel}s, \c nameLine for the QLineEdit and finally, \c addressText for
- the QTextEdit.
-
- Next, we have to position the widgets properly, according to the screenshot
- earlier. We use a QGridLayout to position our labels and input fields in a
- structured manner. QGridLayout divides the available space into a grid and
- places widgets in the cells we specify with row and column numbers. The
- diagram below shows the layout cells and the position of our widgets.
-
- \image addressbook-tutorial-part1-labeled-screenshot.png
-
-
- \section1 Qt Programming - Subclassing
-
- When writing Qt programs, we usually subclass Qt objects to add
- functionality. This is one of the essential concepts behind creating custom
- widgets or collections of standard widgets. Subclassing to extend or change
- the behavior of a widget has the following advantages:
-
- \list
- \o We can write implementations of virtual or pure virtual functions
- to obtain exactly what we need, falling back on the base class's
- implementation when necessary.
- \o It allows us to encapsulate parts of the user interface within a
- class, so that the other parts of the application do not need to
- know about the individual widgets in the user interface.
- \o The subclass can be used to create multiple custom widgets in the
- same application or library, and the code for the subclass can be
- reused in other projects.
- \endlist
-
-
-
-
-*/
diff --git a/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp b/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
index 8216b6e..7311b65 100644
--- a/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
+++ b/examples/graphicsview/basicgraphicslayouts/layoutitem.cpp
@@ -43,19 +43,18 @@
//! [0]
LayoutItem::LayoutItem(QGraphicsItem *parent/* = 0*/)
- : QGraphicsWidget(parent)
+ : QGraphicsLayoutItem(), QGraphicsItem(parent)
{
- pix = new QPixmap(QLatin1String(":/images/block.png"));
- // Do not allow a size smaller than the pixmap with two frames around it.
- setMinimumSize(pix->size() + QSize(12, 12));
+ m_pix = new QPixmap(QLatin1String(":/images/block.png"));
+ setGraphicsItem(this);
}
//! [0]
LayoutItem::~LayoutItem()
{
- delete pix;
+ delete m_pix;
}
-
+
//! [1]
void LayoutItem::paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget /*= 0*/)
@@ -64,8 +63,8 @@ void LayoutItem::paint(QPainter *painter,
Q_UNUSED(option);
QRectF frame(QPointF(0,0), geometry().size());
- qreal w = pix->width();
- qreal h = pix->height();
+ qreal w = m_pix->width();
+ qreal h = m_pix->height();
QGradientStops stops;
//! [1]
@@ -94,6 +93,39 @@ void LayoutItem::paint(QPainter *painter,
gradient.setStops(stops);
painter->setBrush(QBrush(gradient));
painter->drawRoundedRect(innerFrame, 10.0, 10.0);
- painter->drawPixmap(pixpos, *pix);
+ painter->drawPixmap(pixpos, *m_pix);
}
//! [2]
+
+//! [3]
+QRectF LayoutItem::boundingRect() const
+{
+ return QRectF(QPointF(0,0), geometry().size());
+}
+//! [3]
+
+//! [4]
+void LayoutItem::setGeometry(const QRectF &geom)
+{
+ prepareGeometryChange();
+ QGraphicsLayoutItem::setGeometry(geom);
+ setPos(geom.topLeft());
+}
+//! [4]
+
+//! [5]
+QSizeF LayoutItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
+{
+ switch (which) {
+ case Qt::MinimumSize:
+ case Qt::PreferredSize:
+ // Do not allow a size smaller than the pixmap with two frames around it.
+ return m_pix->size() + QSize(12, 12);
+ case Qt::MaximumSize:
+ return QSizeF(1000,1000);
+ default:
+ break;
+ }
+ return constraint;
+}
+//! [5]
diff --git a/examples/graphicsview/basicgraphicslayouts/layoutitem.h b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
index cbda636..8ec9038 100644
--- a/examples/graphicsview/basicgraphicslayouts/layoutitem.h
+++ b/examples/graphicsview/basicgraphicslayouts/layoutitem.h
@@ -44,18 +44,22 @@
#include <QtGui>
//! [0]
-class LayoutItem : public QGraphicsWidget
+class LayoutItem : public QGraphicsLayoutItem, public QGraphicsItem
{
- Q_OBJECT
-
public:
LayoutItem(QGraphicsItem *parent = 0);
~LayoutItem();
+ // Inherited from QGraphicsLayoutItem
+ void setGeometry(const QRectF &geom);
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
+
+ // Inherited from QGraphicsItem
+ QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget = 0);
private:
- QPixmap *pix;
+ QPixmap *m_pix;
};
//! [0]
diff --git a/examples/graphicsview/flowlayout/flowlayout.cpp b/examples/graphicsview/flowlayout/flowlayout.cpp
new file mode 100644
index 0000000..d36c37f
--- /dev/null
+++ b/examples/graphicsview/flowlayout/flowlayout.cpp
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "flowlayout.h"
+#include <QtGui/qwidget.h>
+#include <QtCore/qmath.h>
+
+FlowLayout::FlowLayout()
+{
+ m_spacing[0] = 6;
+ m_spacing[1] = 6;
+ QSizePolicy sp = sizePolicy();
+ sp.setHeightForWidth(true);
+ setSizePolicy(sp);
+}
+
+void FlowLayout::insertItem(int index, QGraphicsLayoutItem *item)
+{
+ item->setParentLayoutItem(this);
+ if (uint(index) > uint(m_items.count()))
+ index = m_items.count();
+ m_items.insert(index, item);
+ invalidate();
+}
+
+int FlowLayout::count() const
+{
+ return m_items.count();
+}
+
+QGraphicsLayoutItem *FlowLayout::itemAt(int index) const
+{
+ return m_items.value(index);
+}
+
+void FlowLayout::removeAt(int index)
+{
+ m_items.removeAt(index);
+ invalidate();
+}
+
+qreal FlowLayout::spacing(Qt::Orientation o) const
+{
+ return m_spacing[int(o) - 1];
+}
+
+void FlowLayout::setSpacing(Qt::Orientations o, qreal spacing)
+{
+ if (o & Qt::Horizontal)
+ m_spacing[0] = spacing;
+ if (o & Qt::Vertical)
+ m_spacing[1] = spacing;
+}
+
+void FlowLayout::setGeometry(const QRectF &geom)
+{
+ QGraphicsLayout::setGeometry(geom);
+ doLayout(geom, true);
+}
+
+qreal FlowLayout::doLayout(const QRectF &geom, bool applyNewGeometry) const
+{
+ QPointF tl = geom.topLeft();
+ qreal maxw = geom.width();
+
+ qreal left, top, right, bottom;
+ getContentsMargins(&left, &top, &right, &bottom);
+ maxw = maxw - left - right;
+ qreal x = 0;
+ qreal y = 0;
+ qreal maxRowHeight = 0;
+ QSizeF pref;
+ for (int i = 0; i < m_items.count(); ++i) {
+ QGraphicsLayoutItem *item = m_items.at(i);
+ pref = item->effectiveSizeHint(Qt::PreferredSize);
+ maxRowHeight = qMax(maxRowHeight, pref.height());
+
+ qreal next_x;
+ next_x = x + pref.width();
+ if (next_x > maxw) {
+ if (x == 0) {
+ pref.setWidth(maxw);
+ } else {
+ x = 0;
+ next_x = pref.width();
+ }
+ y += maxRowHeight + spacing(Qt::Vertical);
+ maxRowHeight = 0;
+ }
+
+ if (applyNewGeometry)
+ item->setGeometry(QRectF(QPointF(left + x, top + y), pref));
+ x = next_x + spacing(Qt::Horizontal);
+ }
+ maxRowHeight = qMax(maxRowHeight, pref.height());
+ return top + y + maxRowHeight + bottom;
+}
+
+QSizeF FlowLayout::minSize(const QSizeF &constraint) const
+{
+ QSizeF size(0, 0);
+ qreal left, top, right, bottom;
+ getContentsMargins(&left, &top, &right, &bottom);
+ if (constraint.width() > 0) { // height for width
+ qreal height = doLayout(QRectF(QPointF(0,0), constraint), false);
+ size = QSizeF(constraint.width(), height);
+ } else {
+ QGraphicsLayoutItem *item;
+ foreach (item, m_items)
+ size = size.expandedTo(item->effectiveSizeHint(Qt::MinimumSize));
+ size += QSize(left + right, top + bottom);
+ }
+ return size;
+}
+
+QSizeF FlowLayout::prefSize() const
+{
+ qreal left, top, right, bottom;
+ getContentsMargins(&left, &top, &right, &bottom);
+
+ QGraphicsLayoutItem *item;
+ qreal maxh = 0;
+ qreal totalWidth = 0;
+ foreach (item, m_items) {
+ if (totalWidth > 0)
+ totalWidth += spacing(Qt::Horizontal);
+ QSizeF pref = item->effectiveSizeHint(Qt::PreferredSize);
+ totalWidth += pref.width();
+ maxh = qMax(maxh, pref.height());
+ }
+ maxh += spacing(Qt::Vertical);
+
+ const qreal goldenAspectRatio = 1.61803399;
+ qreal w = qSqrt(totalWidth * maxh * goldenAspectRatio) + left + right;
+
+ return minSize(QSizeF(w, -1));
+}
+
+QSizeF FlowLayout::maxSize() const
+{
+ QGraphicsLayoutItem *item;
+ qreal totalWidth = 0;
+ qreal totalHeight = 0;
+ foreach (item, m_items) {
+ if (totalWidth > 0)
+ totalWidth += spacing(Qt::Horizontal);
+ if (totalHeight > 0)
+ totalHeight += spacing(Qt::Vertical);
+ QSizeF pref = item->effectiveSizeHint(Qt::PreferredSize);
+ totalWidth += pref.width();
+ totalHeight += pref.height();
+ }
+
+ qreal left, top, right, bottom;
+ getContentsMargins(&left, &top, &right, &bottom);
+ return QSizeF(left + totalWidth + right, top + totalHeight + bottom);
+}
+
+QSizeF FlowLayout::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
+{
+ switch (which) {
+ case Qt::PreferredSize:
+ return prefSize();
+ case Qt::MinimumSize:
+ return minSize(constraint);
+ case Qt::MaximumSize:
+ return maxSize();
+ default:
+ break;
+ }
+ return constraint;
+}
diff --git a/examples/graphicsview/flowlayout/flowlayout.h b/examples/graphicsview/flowlayout/flowlayout.h
new file mode 100644
index 0000000..c1e5635
--- /dev/null
+++ b/examples/graphicsview/flowlayout/flowlayout.h
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qgraphicslayout.h>
+
+class FlowLayout : public QGraphicsLayout
+{
+public:
+ FlowLayout();
+ inline void addItem(QGraphicsLayoutItem *item);
+ void insertItem(int index, QGraphicsLayoutItem *item);
+ void setSpacing(Qt::Orientations o, qreal spacing);
+ qreal spacing(Qt::Orientation o) const;
+
+ // inherited functions
+ void setGeometry(const QRectF &geom);
+
+ int count() const;
+ QGraphicsLayoutItem *itemAt(int index) const;
+ void removeAt(int index);
+
+protected:
+ QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
+
+private:
+ qreal doLayout(const QRectF &geom, bool applyNewGeometry) const;
+ QSizeF minSize(const QSizeF &constraint) const;
+ QSizeF prefSize() const;
+ QSizeF maxSize() const;
+
+ QList<QGraphicsLayoutItem*> m_items;
+ qreal m_spacing[2];
+};
+
+
+inline void FlowLayout::addItem(QGraphicsLayoutItem *item)
+{
+ insertItem(-1, item);
+}
diff --git a/examples/graphicsview/flowlayout/flowlayout.pro b/examples/graphicsview/flowlayout/flowlayout.pro
new file mode 100644
index 0000000..c029d6c
--- /dev/null
+++ b/examples/graphicsview/flowlayout/flowlayout.pro
@@ -0,0 +1,12 @@
+######################################################################
+# Automatically generated by qmake (2.01a) ma 30. mar 12:46:15 2009
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+
+# Input
+HEADERS += flowlayout.h window.h
+SOURCES += flowlayout.cpp main.cpp window.cpp
diff --git a/src/plugins/kbddrivers/linuxis/linuxiskbdhandler.h b/examples/graphicsview/flowlayout/main.cpp
index 3211309..d1a40c7 100644
--- a/src/plugins/kbddrivers/linuxis/linuxiskbdhandler.h
+++ b/examples/graphicsview/flowlayout/main.cpp
@@ -3,7 +3,7 @@
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
-** This file is part of the plugins of the Qt Toolkit.
+** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,42 +39,17 @@
**
****************************************************************************/
-#ifndef LINUXISKBDHANDLER_H
-#define LINUXISKBDHANDLER_H
+#include <QtGui>
+#include "window.h"
-#include <QObject>
-#include <QWSKeyboardHandler>
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
-class QSocketNotifier;
-class LinuxInputSubsystemKbdHandler : public QObject, public QWSKeyboardHandler {
- Q_OBJECT
-public:
- LinuxInputSubsystemKbdHandler(const QString &device = QString("/dev/input/event0"));
- ~LinuxInputSubsystemKbdHandler();
-
- struct keytable_s {
- int code;
- int unicode;
- int keycode;
- };
-
- struct keymap_s {
- int unicode;
- int keycode;
- };
-
-private:
- void initmap();
-
- QSocketNotifier *m_notify;
- int kbdFD;
- bool shift;
-
- static struct keytable_s keytable[];
- static struct keymap_s keymap[];
-
-private Q_SLOTS:
- void readKbdData();
-};
-
-#endif // LINUXISKBDHANDLER_H
+ QGraphicsScene scene;
+ QGraphicsView *view = new QGraphicsView(&scene);
+ Window *w = new Window;
+ scene.addItem(w);
+ view->show();
+ return app.exec();
+}
diff --git a/examples/graphicsview/flowlayout/window.cpp b/examples/graphicsview/flowlayout/window.cpp
new file mode 100644
index 0000000..dd53b56
--- /dev/null
+++ b/examples/graphicsview/flowlayout/window.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples 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 qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/qgraphicsproxywidget.h>
+#include <QtGui/qlabel.h>
+#include "flowlayout.h"
+#include "window.h"
+
+Window::Window()
+: QGraphicsWidget(0, Qt::Window)
+{
+ FlowLayout *lay = new FlowLayout;
+ QLatin1String wiseWords("I am not bothered by the fact that I am unknown."
+ "I am bothered when I do not know others. (Confucius)");
+ QString sentence(wiseWords);
+ QStringList words = sentence.split(QLatin1Char(' '), QString::SkipEmptyParts);
+ for (int i = 0; i < words.count(); ++i) {
+ QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this);
+ QLabel *label = new QLabel(words.at(i));
+ label->setFrameStyle(QFrame::Box | QFrame::Plain);
+ proxy->setWidget(label);
+ lay->addItem(proxy);
+ }
+ setLayout(lay);
+}
diff --git a/src/plugins/kbddrivers/linuxis/linuxiskbddriverplugin.h b/examples/graphicsview/flowlayout/window.h
index b5f599f..6d315f5 100644
--- a/src/plugins/kbddrivers/linuxis/linuxiskbddriverplugin.h
+++ b/examples/graphicsview/flowlayout/window.h
@@ -3,7 +3,7 @@
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
-** This file is part of the plugins of the Qt Toolkit.
+** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,20 +39,10 @@
**
****************************************************************************/
-#ifndef LINUXISKBDDRIVERPLUGIN_H
-#define LINUXISKBDDRIVERPLUGIN_H
+#include <QtGui/qgraphicswidget.h>
-#include <QtGui/QWSKeyboardHandlerFactoryInterface>
-
-class LinuxInputSubsystemKbdDriverPlugin : public QKbdDriverPlugin {
+class Window : public QGraphicsWidget {
Q_OBJECT
public:
- LinuxInputSubsystemKbdDriverPlugin( QObject *parent = 0 );
- ~LinuxInputSubsystemKbdDriverPlugin();
-
- QWSKeyboardHandler* create(const QString& driver, const QString& device);
- QWSKeyboardHandler* create(const QString& driver);
- QStringList keys()const;
+ Window();
};
-
-#endif // LINUXISKBDDRIVERPLUGIN_H
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
index faa9871..f1dcf37 100644
--- a/mkspecs/features/moc.prf
+++ b/mkspecs/features/moc.prf
@@ -61,7 +61,10 @@ QMAKE_EXTRA_COMPILERS += moc_source
INCREDIBUILD_XGE += moc_source
#make sure we can include these files
-INCLUDEPATH += $$MOC_DIR
+moc_dir_short = $$MOC_DIR
+win32:moc_dir_short ~= s,^.:,/,
+contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR
+else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR
#auto depend on moc
unix:!no_mocdepend {
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index 885fad7..c7b1686 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -34,7 +34,10 @@ isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
INCREDIBUILD_XGE += uic
}
-INCLUDEPATH += $$UI_HEADERS_DIR
+ui_dir_short = $$UI_HEADERS_DIR
+win32:ui_dir_short ~= s,^.:,/,
+contains(ui_dir_short, ^[/\\\\].*):INCLUDEPATH += $$UI_HEADERS_DIR
+else:INCLUDEPATH += $$OUT_PWD/$$UI_HEADERS_DIR
uic3 {
isEmpty(FORMS3) {
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp