From 0d3738134f1797a18475fa043751c168eabb48e8 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 21 Sep 2009 15:15:21 +1000 Subject: Add INSTALL file. Previously a different version of this file was added to each source package. As the file is now the same for all source packages, it can be added to the repo. Reviewed-by: Trust Me --- INSTALL | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 INSTALL diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..22e993a --- /dev/null +++ b/INSTALL @@ -0,0 +1,150 @@ + INSTALLING Qt Source Package Version %VERSION%. + +1. If you have the commercial edition of Qt, install your license + file as $HOME/.qt-license if you are on Unix. If you are on + Windows, copy the license file into your home directory + (this may be known as the userprofile environment variable) and + rename it to .qt-license. For example on Windows XP, + %USERPROFILE% should be something like C:\Documents and + Settings\username. + + For the open source version you do not need a license file. + +2. Unpack the archive if you have not done so already: + + On Unix (X11 and Mac): + cd /tmp + gunzip %DISTNAME%.tar.gz # uncompress the archive + tar xvf %DISTNAME%.tar # unpack it + + This creates the directory /tmp/%DISTNAME% containing the files + from the archive. We only support the GNU version of the tar + archiving utility. Note that on some systems it is called gtar. + + On Windows, uncompress the files into the directory you want Qt + installed, e.g. C:\Qt\%VERSION%. + + NOTE: The install path must not contain any spaces. + +4. Environment variables + + In order to build and use Qt, the PATH environment variable needs + to be extended to locate qmake, moc and other Qt tools + + On Windows, this is done by adding C:\Qt\%VERSION%\bin + to the PATH variable. On Unix, this is done by adding + /tmp/%DISTNAME%. + + For newer versions of Windows, PATH can be extended through + "Control Panel->System->Advanced->Environment variables" and for + older versions by editing C:\autoexec.bat. + + In .profile (if your Unix shell is bash), add the following lines: + + PATH=/usr/local/Trolltech/Qt-%VERSION%/bin:$PATH + export PATH + + In .login (in case your Unix shell is csh or tcsh), add the following line: + + setenv PATH /usr/local/Trolltech/Qt-%VERSION%/bin:$PATH + + If you use a different Unix shell, please modify your environment + variables accordingly. + + For some X11 compilers that do not support rpath you must also + extended the LD_LIBRARY_PATH environment variable to include + /usr/local/Trolltech/Qt-%VERSION%/lib. On Linux or Mac with GCC + this step is not needed. + +4. Building + +4.1 Building on Unix + + To configure the Qt library for your machine type, run the + ./configure script in the package directory. + + By default, Qt is configured for installation in the + /usr/local/Trolltech/Qt-%VERSION% directory, but this can be + changed by using the -prefix option. Alternatively, the + -prefix-install option can be used to specify a "local" + installation within the source directory. + + cd /tmp/%DISTNAME% + ./configure + + Type "./configure -help" to get a list of all available options. + + To create the library and compile all the demos, examples, tools, + and tutorials, type: + + make + + If you did not configure Qt using the -prefix-install option, + you need to install the library, demos, examples, tools, and + tutorials in the appropriate place. To do this, type: + + su -c "make install" + + and enter the root password. On some systems, you have to use the + sudo command as follows: + + sudo make install + + and enter your password, this requires that you have administrator access + to your machine. + + Note that on some systems the make utility is named differently, + e.g. gmake. The configure script tells you which make utility to + use. + + If you need to reconfigure and rebuild Qt from the same location, + ensure that all traces of the previous configuration are removed + by entering the build directory and typing + + make confclean + + before running the configure script again. + +4.2 Building on Windows + + To configure the Qt library for your machine type: + + C: + cd \Qt\%VERSION% + configure + + Type "configure -help" to get a list of all available options. + + If you are using the "-direct3d" option, make sure that you have + the Direct3D SDK installed, and that you have run the + %DXSDK_DIR%\Utilities\Bin\dx_setenv.cmd command, before attempting + to run configure. + + The actual commands needed to build Qt depends on your development + system. For Microsoft Visual Studio to create the library and + compile all the demos, examples, tools and tutorials type: + + nmake + + If you need to reconfigure and rebuild Qt from the same location, + ensure that all traces of the previous configuration are removed + by entering the build directory and typing + + nmake confclean + + before running the configure script again. + +5. That's all. Qt is now installed. + + If you are new to Qt, we suggest that you take a look at the demos + and examples to see Qt in action. Run the Qt Examples and Demos + either by typing 'qtdemo' on the command line or through the + desktop's Start menu. + + You might also want to try the following links: + + http://qt.nokia.com/doc/%VERSION%/how-to-learn-qt.html + http://qt.nokia.com/doc/%VERSION%/tutorial.html + http://qt.nokia.com/developer + + We hope you will enjoy using Qt. Good luck! -- cgit v0.12 From c8816c6da9d265e5ccbf0385280556f9b4c521f6 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 21 Sep 2009 16:03:39 +0200 Subject: QCoreApplicationPrivate::appendApplicationPathToLibraryPaths WinCE fix On Windows CE the plugin path is likely to be the same as the application directory. That's why we must not compare app_location with the plugins path. The check app_libpaths->contains(app_location) should be enough. Autotest: tst_QApplication::libraryPaths Reviewed-by: thartman --- src/corelib/kernel/qcoreapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index c0c55bb..fabbc69 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -316,7 +316,7 @@ void QCoreApplicationPrivate::appendApplicationPathToLibraryPaths() QString app_location( QCoreApplication::applicationFilePath() ); app_location.truncate(app_location.lastIndexOf(QLatin1Char('/'))); app_location = QDir(app_location).canonicalPath(); - if (app_location != QLibraryInfo::location(QLibraryInfo::PluginsPath) && QFile::exists(app_location) && !app_libpaths->contains(app_location)) + if (QFile::exists(app_location) && !app_libpaths->contains(app_location)) app_libpaths->append(app_location); #endif } -- cgit v0.12 From 90f0facddb799640ef9e123a3fc222e6a758c7be Mon Sep 17 00:00:00 2001 From: Stian Sandvik Thomassen Date: Tue, 22 Sep 2009 13:43:17 +1000 Subject: Added more tests for QTextCodec::codecForHtml() --- tests/auto/qtextcodec/tst_qtextcodec.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp index 4f3df29..89a1ef5 100644 --- a/tests/auto/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp @@ -1747,10 +1747,17 @@ void tst_QTextCodec::codecForHtml() QCOMPARE(QTextCodec::codecForHtml(html)->mibEnum(), 4); // latin 1 - QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 106); // utf-8 + QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 106); // UTF-8 html = ""; QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 111); // latin 15 + + html = ""; + QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 111); // latin 15 + + html = ""; + QCOMPARE(QTextCodec::codecForHtml(html, QTextCodec::codecForMib(106))->mibEnum(), 106); // UTF-8 + QCOMPARE(QTextCodec::codecForHtml(html)->mibEnum(), 4); // latin 1 } #ifdef Q_OS_UNIX -- cgit v0.12 From 7a410f71a1dffd224082a9e8f547baffbee9f514 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 22 Sep 2009 10:09:01 +0200 Subject: tst_windowsmobile: local include corrected Reviewed-by: TrustMe --- tests/auto/windowsmobile/test/tst_windowsmobile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp index 533d98f..a49e9a6 100644 --- a/tests/auto/windowsmobile/test/tst_windowsmobile.cpp +++ b/tests/auto/windowsmobile/test/tst_windowsmobile.cpp @@ -45,7 +45,7 @@ #include #include #include -#include +#include "ddhelper.h" -- cgit v0.12 From d14fd301314bcceaf2594a5a18f6d20894c1d353 Mon Sep 17 00:00:00 2001 From: Andrew Christian Date: Thu, 17 Sep 2009 12:31:00 -0400 Subject: Cached clip path not cleared correctly for ancestor that clips to shape Fix QGraphicsItem to clear clip path for items with an ancestor that clips to shape. Added autotest to demonstrate clipping path problem. Merge-request: 810 Reviewed-by: Alexis Reviewed-by: Andreas --- src/gui/graphicsview/qgraphicsitem.cpp | 6 +++-- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 32 ++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 2ee03e4..5799fe7 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -5742,10 +5742,12 @@ void QGraphicsItem::prepareGeometryChange() if (d_ptr->inSetPosHelper) return; - if (d_ptr->flags & ItemClipsChildrenToShape) + if (d_ptr->flags & ItemClipsChildrenToShape + || d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren) { d_ptr->invalidateCachedClipPathRecursively(); - else + } else { d_ptr->invalidateCachedClipPath(); + } } /*! diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index d6605db..391ccf8 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -194,6 +194,7 @@ private slots: void itemClipsToShape(); void itemClipsChildrenToShape(); void itemClipsChildrenToShape2(); + void itemClipsChildrenToShape3(); void itemClipsTextChildToShape(); void itemClippingDiscovery(); void ancestorFlags(); @@ -4691,6 +4692,37 @@ void tst_QGraphicsItem::itemClipsChildrenToShape2() #endif } +void tst_QGraphicsItem::itemClipsChildrenToShape3() +{ + // Construct a scene with nested children, each 50 pixels offset from the elder. + // Set a top-level clipping flag + QGraphicsScene scene; + QGraphicsRectItem *parent = scene.addRect( 0, 0, 150, 150 ); + QGraphicsRectItem *child = scene.addRect( 0, 0, 150, 150 ); + QGraphicsRectItem *grandchild = scene.addRect( 0, 0, 150, 150 ); + child->setParentItem(parent); + grandchild->setParentItem(child); + child->setPos( 50, 50 ); + grandchild->setPos( 50, 50 ); + parent->setFlag(QGraphicsItem::ItemClipsChildrenToShape); + + QCOMPARE(scene.itemAt(25,25), (QGraphicsItem *)parent); + QCOMPARE(scene.itemAt(75,75), (QGraphicsItem *)child); + QCOMPARE(scene.itemAt(125,125), (QGraphicsItem *)grandchild); + QCOMPARE(scene.itemAt(175,175), (QGraphicsItem *)0); + + // Move child to fully overlap the parent. The grandchild should + // now occupy two-thirds of the scene + child->prepareGeometryChange(); + child->setPos( 0, 0 ); + + QCOMPARE(scene.itemAt(25,25), (QGraphicsItem *)child); + QCOMPARE(scene.itemAt(75,75), (QGraphicsItem *)grandchild); + QCOMPARE(scene.itemAt(125,125), (QGraphicsItem *)grandchild); + QCOMPARE(scene.itemAt(175,175), (QGraphicsItem *)0); +} + + void tst_QGraphicsItem::itemClipsTextChildToShape() { // Construct a scene with a rect that clips its children, with one text -- cgit v0.12