Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73300 - in trunk/tools/build/v2: test/qt4 tools
From: juergen.hunold_at_[hidden]
Date: 2011-07-22 08:24:18


Author: jhunold
Date: 2011-07-22 08:24:17 EDT (Fri, 22 Jul 2011)
New Revision: 73300
URL: http://svn.boost.org/trac/boost/changeset/73300

Log:
Maintenance and Qt-4.7.x support
Added:
   trunk/tools/build/v2/test/qt4/qtdeclarative.cpp
      - copied, changed from r73299, /trunk/tools/build/v2/test/qt4/phonon.cpp
Text files modified:
   trunk/tools/build/v2/test/qt4/jamroot.jam | 20 +++++++++++++++++++-
   trunk/tools/build/v2/test/qt4/phonon.cpp | 2 +-
   trunk/tools/build/v2/test/qt4/qtdeclarative.cpp | 16 ++++++++++------
   trunk/tools/build/v2/test/qt4/qtmultimedia.cpp | 2 +-
   trunk/tools/build/v2/test/qt4/qtscript.cpp | 12 ++++++++----
   trunk/tools/build/v2/tools/qt4.jam | 15 +++++++++++----
   6 files changed, 50 insertions(+), 17 deletions(-)

Modified: trunk/tools/build/v2/test/qt4/jamroot.jam
==============================================================================
--- trunk/tools/build/v2/test/qt4/jamroot.jam (original)
+++ trunk/tools/build/v2/test/qt4/jamroot.jam 2011-07-22 08:24:17 EDT (Fri, 22 Jul 2011)
@@ -39,9 +39,12 @@
       [ link phonon.cpp /qt//phonon ]
       [ link qtmultimedia.cpp /qt//QtMultimedia ]
 
+ # QML
+ [ link qtdeclarative.cpp /qt//QtDeclarative ]
+
       # Help systems.
       [ link qthelp.cpp /qt//QtHelp ]
- [ link qtassistant.cpp /qt//QtAssistantClient ]
+ [ link qtassistant.cpp /qt//QtAssistantClient : <conditional>@check_for_assistant ]
 
       # Check working and disabled Qt3Support
       [ link qt3support.cpp /qt//Qt3Support : <qt3support>on ]
@@ -56,3 +59,18 @@
    : # usage-requirements
    ;
 }
+
+# QtAssistant is removed from Qt >= 4.6
+rule check_for_assistant ( properties * )
+{
+ # Extract version number from toolset
+ local version = [ MATCH "<qt>([0-9.]+).*"
+ : $(properties) ] ;
+
+ if $(version) > "4.6.99"
+ {
+ result += <build>no ;
+ }
+}
+
+

Modified: trunk/tools/build/v2/test/qt4/phonon.cpp
==============================================================================
--- trunk/tools/build/v2/test/qt4/phonon.cpp (original)
+++ trunk/tools/build/v2/test/qt4/phonon.cpp 2011-07-22 08:24:17 EDT (Fri, 22 Jul 2011)
@@ -5,7 +5,7 @@
 
 #define BOOST_TEST_MODULE QtPhonon
 
-#include <Phonon/MediaObject>
+#include <phonon/MediaObject>
 
 #include <boost/test/unit_test.hpp>
 

Copied: trunk/tools/build/v2/test/qt4/qtdeclarative.cpp (from r73299, /trunk/tools/build/v2/test/qt4/phonon.cpp)
==============================================================================
--- /trunk/tools/build/v2/test/qt4/phonon.cpp (original)
+++ trunk/tools/build/v2/test/qt4/qtdeclarative.cpp 2011-07-22 08:24:17 EDT (Fri, 22 Jul 2011)
@@ -1,11 +1,12 @@
-// (c) Copyright Juergen Hunold 2008
+// (c) Copyright Juergen Hunold 2011
 // Use, modification and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#define BOOST_TEST_MODULE QtPhonon
+#define BOOST_TEST_MODULE QtMultimedia
 
-#include <Phonon/MediaObject>
+#include <QApplication>
+#include <QDeclarativeView>
 
 #include <boost/test/unit_test.hpp>
 
@@ -14,10 +15,13 @@
     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_CORE_LIB), true);
     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_GUI_LIB), true);
     BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_XML_LIB), true);
- BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_PHONON_LIB), true);
+ BOOST_CHECK_EQUAL(BOOST_IS_DEFINED(QT_DECLARATIVE_LIB), true);
 }
 
-BOOST_AUTO_TEST_CASE( phonon_object)
+
+BOOST_AUTO_TEST_CASE( declarative )
 {
- Phonon::MediaObject player;
+ QApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+ QDeclarativeView view;
 }

Modified: trunk/tools/build/v2/test/qt4/qtmultimedia.cpp
==============================================================================
--- trunk/tools/build/v2/test/qt4/qtmultimedia.cpp (original)
+++ trunk/tools/build/v2/test/qt4/qtmultimedia.cpp 2011-07-22 08:24:17 EDT (Fri, 22 Jul 2011)
@@ -18,7 +18,7 @@
 
 BOOST_AUTO_TEST_CASE( audiodevices)
 {
- QList<QAudioDeviceId> devices = QAudioDeviceInfo::deviceList(QAudio::AudioOutput);
+ QList<QAudioDeviceInfo> devices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
     for(int i = 0; i < devices.size(); ++i) {
         BOOST_TEST_MESSAGE(QAudioDeviceInfo(devices.at(i)).deviceName().constData());
     }

Modified: trunk/tools/build/v2/test/qt4/qtscript.cpp
==============================================================================
--- trunk/tools/build/v2/test/qt4/qtscript.cpp (original)
+++ trunk/tools/build/v2/test/qt4/qtscript.cpp 2011-07-22 08:24:17 EDT (Fri, 22 Jul 2011)
@@ -7,6 +7,8 @@
 
 #include <QScriptEngine>
 
+#include <QCoreApplication>
+
 #include <boost/test/unit_test.hpp>
 
 #include <iostream>
@@ -25,9 +27,11 @@
 
 BOOST_AUTO_TEST_CASE( script )
 {
- QScriptEngine myEngine;
- QScriptValue three = myEngine.evaluate("1 + 2");
+ QCoreApplication app(boost::unit_test::framework::master_test_suite().argc,
+ boost::unit_test::framework::master_test_suite().argv);
+ QScriptEngine myEngine;
+ QScriptValue three = myEngine.evaluate("1 + 2");
 
- BOOST_CHECK_EQUAL(three.toNumber(), 3);
- BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
+ BOOST_CHECK_EQUAL(three.toNumber(), 3);
+ BOOST_CHECK_EQUAL(three.toString(), QLatin1String("3"));
 }

Modified: trunk/tools/build/v2/tools/qt4.jam
==============================================================================
--- trunk/tools/build/v2/tools/qt4.jam (original)
+++ trunk/tools/build/v2/tools/qt4.jam 2011-07-22 08:24:17 EDT (Fri, 22 Jul 2011)
@@ -415,6 +415,7 @@
 
     # Qt designer library
     add-shared-library QtDesigner : QtGui QtXml : : $(target-requirements) ;
+ add-shared-library QtDesignerComponents : QtGui QtXml : : $(target-requirements) ;
 
     # Support for dynamic Widgets (Qt 4.1)
     add-static-library QtUiTools : QtGui QtXml : $(target-requirements) ;
@@ -441,13 +442,19 @@
     add-shared-library QtXmlPatterns : QtNetwork : QT_XMLPATTERNS_LIB : $(target-requirements) ;
 
     # Help-Engine (Qt 4.4)
- add-shared-library QtHelp : QtGui QtSql QtXml : : $(target-requirements) ;
+ add-shared-library QtHelp : QtGui QtSql QtXml : : $(target-requirements) ;
+ add-shared-library QtCLucene : QCore QtSql QtXml : : $(target-requirements) ;
+
+ # QML-Engine (Qt 4.7)
+ add-shared-library QtDeclarative : QtGui QtXml : : $(target-requirements) ;
 
     # AssistantClient Support
- # Compat library
+ # Compat library removed in 4.7.0
     # Pre-4.4 help system, use QtHelp for new programs
- add-shared-library QtAssistantClient : QtGui : : $(target-requirements) : QtAssistant ;
-
+ if $(version) < "4.7"
+ {
+ add-shared-library QtAssistantClient : QtGui : : $(target-requirements) : QtAssistant ;
+ }
     debug-message "==== Configured Qt-$(version) ====" ;
 
     project.pop-current ;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk