diff options
24 files changed, 187 insertions, 160 deletions
@@ -816,6 +816,7 @@ l_FLAGS= QCONFIG_FLAGS= XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian-gcce" XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) +XPLATFORM_INTEGRITY=no # Whether target platform is INTEGRITY (*integrity*) XPLATFORM_SYMBIAN=no # Whether target platform is SYMBIAN (*symbian*) XPLATFORM_SYMBIAN_SBSV2=no # Whether target platform is SYMBIAN_SBSV2 (symbian-sbsv2) PLATFORM=$QMAKESPEC @@ -1596,6 +1597,7 @@ while [ "$#" -gt 0 ]; do xplatform) XPLATFORM="$VAL" case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac + case "$XPLATFORM" in *integrity*) XPLATFORM_INTEGRITY=yes;; esac case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac ;; @@ -2899,6 +2901,7 @@ fi [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac +case "$XPLATFORM" in *integrity*) XPLATFORM_INTEGRITY=yes;; esac case "$XPLATFORM" in *symbian*) XPLATFORM_SYMBIAN=yes;; esac case "$XPLATFORM" in symbian-sbsv2) XPLATFORM_SYMBIAN_SBSV2=yes;; esac @@ -3179,6 +3182,8 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then esac elif [ "$XPLATFORM_MINGW" = "yes" ]; then [ -z "$CFG_ARCH" ] && CFG_ARCH="windows" +elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + CFG_ARCH=integrity elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then CFG_ARCH=symbian elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then @@ -3531,6 +3536,19 @@ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS= [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES= [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS= +elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + [ -z "$QT_HOST_PREFIX" ] && QT_HOST_PREFIX="$QT_INSTALL_PREFIX" + [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" + [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include" + [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" + [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" + [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" + [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" + [ -z "$QT_INSTALL_DATA" ] && QT_INSTALL_DATA="$QT_INSTALL_PREFIX" + [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations" + [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS="$QT_INSTALL_PREFIX" + [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" + [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos" else #docs if [ -z "$QT_INSTALL_DOCS" ]; then #default @@ -4422,6 +4440,8 @@ if [ "$PLATFORM_QWS" = "yes" ]; then Platform="Qt for Embedded Linux" elif [ "$PLATFORM_QPA" = "yes" ]; then Platform="Qt Lighthouse" +elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + Platform="Qt for INTEGRITY" elif [ "$XPLATFORM_SYMBIAN" = "yes" ]; then Platform="Qt for Symbian" elif [ "$PLATFORM_MAC" = "yes" ]; then @@ -5115,6 +5135,26 @@ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then fi fi fi +# Adjust all variables for INTEGRITY +if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + QMakeVar set gfx-drivers "integrityfb" + QMakeVar set kbd-drivers "integrity" + QMakeVar set mouse-drivers "integrity" + CFG_TIFF="no" + CFG_KBD_ON="integrity" + CFG_MOUSE_ON="integrity" + CFG_GFX_ON="integrityfb" + CFG_LARGEFILE="no" + CFG_STL="yes" + CFG_OPENSSL="no" + CFG_GLIB="no" + CFG_SHARED="no" + if [ "$CFG_SCRIPT" != "yes" ]; then + CFG_SCRIPT="no" + fi + CFG_BUILD_PARTS="libs examples demos" + CFG_GIF="no" +fi # check IPC support if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_sysv "ipc_sysv" $L_FLAGS $I_FLAGS $l_FLAGS ; then @@ -6584,7 +6624,7 @@ if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then fi HAVE_STL=no -if [ "$XPLATFORM_SYMBIAN" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then +if [ "$XPLATFORM_SYMBIAN" = "yes" ] || [ "$XPLATFORM_INTEGRITY" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then HAVE_STL=yes fi @@ -6980,9 +7020,9 @@ case "$PLATFORM,$CFG_MAC_COCOA" in ;; esac -# disable Qt 3 support on VxWorks and Symbian +# disable Qt 3 support on VxWorks, Symbian and INTEGRITY case "$XPLATFORM" in - unsupported/vxworks*|symbian*) + unsupported/vxworks*|symbian*|unsupported/integrity*) CFG_QT3SUPPORT="no" ;; esac @@ -7122,10 +7162,17 @@ if [ "$XPLATFORM_MINGW" != "yes" ]; then # debug and release precompiled headers are kept separate. QMakeVar set PRECOMPILED_DIR ".pch/$QMAKE_OUTDIR" fi -QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR" -QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR" -QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" -QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" +if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then + QMakeVar set OBJECTS_DIR "$PWD/work" + QMakeVar set MOC_DIR "$PWD/work" + QMakeVar set RCC_DIR "$PWD/work" + QMakeVar set UI_DIR "$PWD/work" +else + QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR" + QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR" + QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" + QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" +fi if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG largefile" fi diff --git a/mkspecs/unsupported/integrity-ghs/qmake.conf b/mkspecs/unsupported/integrity-ghs/qmake.conf index 822d6bb..803b2da 100644 --- a/mkspecs/unsupported/integrity-ghs/qmake.conf +++ b/mkspecs/unsupported/integrity-ghs/qmake.conf @@ -7,9 +7,10 @@ MAKEFILE_GENERATOR = GBUILD TEMPLATE = app CONFIG += qt warn_on release integrity unix QT += core gui network +DEFINES += QT_NO_SHAREDMEMORY QT_NO_PROCESS QT_NO_QWS_MULTIPROCESS QT_NO_SYSTEMSEMAPHORE QT_NO_PRINTER QT_NO_QWS_QPF2 -QMAKE_CFLAGS = -bsp $$INTEGRITY_BSP -os_dir $__OS_DIR -QMAKE_CFLAGS += --diag_suppress=1,228,236,381,611,997 +QMAKE_CFLAGS = -bsp $$INTEGRITY_BSP -os_dir $__OS_DIR +QMAKE_CFLAGS += --diag_suppress=1,228,236,381,611,997,1795 QMAKE_CFLAGS_WARN_ON = QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_RELEASE = -g -Ospeed -Olink --signed_fields --no_commons @@ -17,7 +18,7 @@ QMAKE_CFLAGS_DEBUG = -g --no_commons --signed_fields QMAKE_CFLAGS_SHLIB = QMAKE_CFLAGS_THREAD = -D_REENTRANT -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS --no_implicit_include --link_once_templates +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS --no_implicit_include --link_once_templates -non_shared QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE @@ -37,9 +38,9 @@ QMAKE_LIBDIR_OPENGL = QMAKE_INCDIR_QTOPIA = $(QPEDIR)/include QMAKE_LIBDIR_QTOPIA = $(QPEDIR)/lib -QMAKE_LFLAGS = -lposix -livfs -lnet -lsocket -lfbdev -ldl +QMAKE_LFLAGS = -lposix -livfs -lnet -lsocket -lfbdev -lhiddev -ldl QMAKE_LFLAGS_RELEASE = -g -Ospeed -Olink --no_commons -non_shared --link_once_templates -QMAKE_LFLAGS_DEBUG = -g --no_commons +QMAKE_LFLAGS_DEBUG = -g --no_commons -non_shared --link_once_templates QMAKE_LFLAGS_SHLIB = QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = diff --git a/projects.pro b/projects.pro index bf4dc5e..0b498f8 100644 --- a/projects.pro +++ b/projects.pro @@ -8,7 +8,7 @@ TEMPLATE = subdirs cross_compile: CONFIG += nostrip isEmpty(QT_BUILD_PARTS) { #defaults - symbian { + symbian|integrity { QT_BUILD_PARTS = libs tools examples demos } else { QT_BUILD_PARTS = libs tools examples demos docs translations diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp index f9fdb38..8df858a 100644 --- a/qmake/generators/integrity/gbuild.cpp +++ b/qmake/generators/integrity/gbuild.cpp @@ -64,7 +64,7 @@ GBuildMakefileGenerator::GBuildMakefileGenerator() : MakefileGenerator() } bool -GBuildMakefileGenerator::write() +GBuildMakefileGenerator::writeMakefile(QTextStream &text) { QStringList tmp; QString filename(Option::output.fileName()); @@ -77,13 +77,13 @@ GBuildMakefileGenerator::write() /* correct output for non-prl, non-recursive case */ QString outname(qmake_getpwd()); outname += QDir::separator(); - outname += fileInfo(Option::output.fileName()).baseName(); + outname += strtarget; outname += projectSuffix(); Option::output.close(); Option::output.setFileName(outname); MakefileGenerator::openOutput(Option::output, QString()); - if (strtarget != fileInfo(project->projectFile()).baseName()) { + if (strtarget != fileInfo(project->projectFile()).baseName().section('.', -2, -2)) { QString gpjname(strtarget); QString outputName(qmake_getpwd()); outputName += QDir::separator(); @@ -141,18 +141,19 @@ GBuildMakefileGenerator::write() ti << "\tHeapSize\t0x00D00000" << "\n"; ti << "\tTask\tInitial" << "\n"; ti << "\t\tStackSize\t0x30000" << "\n"; + ti << "\t\tStartIt\tTrue" << "\n"; ti << "\tEndTask" << "\n"; ti << "EndAddressSpace" << "\n"; ti.flush(); /* change current project file to <projectname>_app.gpj and continue * generation */ - filename.insert(filename.lastIndexOf("."), "_app"); + outname.insert(outname.lastIndexOf("."), "_app"); Option::output.close(); - Option::output.setFileName(filename); + Option::output.setFileName(outname); MakefileGenerator::openOutput(Option::output, QString()); } else if ((project->first("TEMPLATE") == "lib") - && project->isActiveConfig("shared")) { + && project->isActiveConfig("dll")) { QString gpjname(strtarget); gpjname += "_shared"; gpjname += projectSuffix(); @@ -188,26 +189,28 @@ GBuildMakefileGenerator::write() tl << "}\n" "-sec\n" "{\n" - " .picbase __INTEGRITY_LibCBaseAddress :\n" + " .picbase __INTEGRITY_LibCBaseAddress :\n" " .text :\n" - " .syscall :\n" + " .syscall :\n" " .intercall :\n" " .interfunc :\n" - " .secinfo :\n" - " .rodata align(16) :\n" - " .fixaddr :\n" - " .fixtype :\n" + " .secinfo :\n" + " .rodata align(16) :\n" + " .fixaddr :\n" + " .fixtype :\n" " .rombeg :\n" " .textchecksum :\n" " // The above sections may be large. Leave a bigger gap for large pages.\n" - " .pidbase align(__INTEGRITY_MaxPageAlign) :\n" + " .pidbase align(__INTEGRITY_MaxPageAlign) :\n" " .sdabase :\n" " .data :\n" " .toc :\n" " .opd :\n" " .datachecksum :\n" - " .bss align(__INTEGRITY_MinPageAlign) :\n" - " .heap :\n" + " .sbss : \n" + " .bss align(__INTEGRITY_MinPageAlign) :\n" + " .argsection(__INTEGRITY_MaxPageAlign) :\n" + " .heap : \n" "}\n"; tl.flush(); dllbase += DLLOFFSET; @@ -215,7 +218,9 @@ GBuildMakefileGenerator::write() warn_msg(WarnParser, Option::output.fileName().toAscii()); QTextStream t(&Option::output); - QString primaryTarget(project->values("QMAKE_CXX").at(0)); + QString primaryTarget; + if (!project->values("QMAKE_CXX").isEmpty()) + primaryTarget = project->values("QMAKE_CXX").at(0); pathtoremove += QDir::separator(); filename.remove(qmake_getpwd()); @@ -254,6 +259,8 @@ GBuildMakefileGenerator::write() t << "\t:sourceDir=." << "\n"; t << "\t:outputDir=work" << relpath << "\n"; + t << "\t-I${%expand_path(.)}/work" << relpath << "\n"; + t << "\t--cxx_include_directory ${%expand_path(.)}/work" << relpath << "\n"; if (filename.endsWith("projects.gpj")) { t << "\t:sourceDir=work\n"; t << "\t-Iwork\n"; @@ -270,7 +277,8 @@ GBuildMakefileGenerator::write() } t << "\n"; - t << varGlue("DEFINES", "\t-D", "\n\t-D", "\n"); + if (project->first("TEMPLATE") != "project") + t << varGlue("DEFINES", "\t-D", "\n\t-D", "\n"); t << "\t-I.\n\t-I" << specdir() << "\n"; t << varGlue("INCLUDEPATH", "\t-I", "\n\t-I", "\n"); @@ -306,9 +314,11 @@ GBuildMakefileGenerator::write() continue; if (!project->first((*it) + ".subdir").isEmpty()) gpjname = project->first((*it) + ".subdir"); + /* some SUBDIRS are not actually subdirs, instead .pro files */ + if (gpjname.endsWith(".pro")) + gpjname.chop(4); else - gpjname.replace("_", QDir::separator()); - gpjname += QDir::separator() + gpjname.section(QDir::separator(), -1); + gpjname += QDir::separator() + gpjname.section(QDir::separator(), -1); gpjname += projectSuffix(); /* make relative */ if (!project->values("QT_SOURCE_TREE").isEmpty()) { @@ -328,7 +338,7 @@ GBuildMakefileGenerator::write() t << "\t-name " << tmpstr << "\n"; tmpstr.insert(tmpstr.lastIndexOf(QDir::separator()) + 1, "qrc_"); tmpstr.append(".cpp"); - t << "\t-o work/" << tmpstr << "\n"; + t << "\t-o work/" << relpath << QDir::separator() << tmpstr << "\n"; } } { @@ -340,7 +350,7 @@ GBuildMakefileGenerator::write() tmpstr.insert(tmpstr.lastIndexOf(QDir::separator()) + 1, "ui_"); tmpstr.remove(".ui"); tmpstr.append(".h"); - t << "\t-o work/" << tmpstr << "\n"; + t << "\t-o work/" << relpath << QDir::separator() << tmpstr << "\n"; } } @@ -363,7 +373,7 @@ GBuildMakefileGenerator::write() { QStringList &l = project->values("GENERATED_SOURCES"); for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { - t << "work/" << (*it).section(QDir::separator(), -1) << "\n"; + t << "work/" << relpath << QDir::separator() << (*it).section(QDir::separator(), -1) << "\n"; } } @@ -373,8 +383,9 @@ GBuildMakefileGenerator::write() QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove) { QString s(""); + QString origfilename(filename); s += filename.remove(pathtoremove); - if (filename.endsWith(Option::h_ext.first())) { + if (filename.endsWith(Option::h_ext.first()) && mocable(origfilename)) { QString corename(filename.section(QDir::separator(), -1)); corename.remove(Option::h_ext.first()); corename.append(Option::cpp_ext.first()); @@ -382,6 +393,8 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove s += "\t[MOC/Qt Header]\n"; s += "\t-o "; s += "work/"; + s += pathtoremove; + s += QDir::separator(); s += corename; s += "\n"; } else if (filename.section(QDir::separator(), -1).startsWith("qrc_")) { @@ -390,7 +403,7 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove s += tmpstr; s += ".qrc"; s += "\n"; - } else if (filename.endsWith(Option::cpp_ext.first())) { + } else if (filename.endsWith(Option::cpp_ext.first()) && mocable(origfilename)) { QString tmpstr(filename.section("/", -1)); QString filepath(pathtoremove); if (!project->values("QT_SOURCE_TREE").isEmpty()) { @@ -406,6 +419,8 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove s += " -o "; tmpstr.replace(Option::cpp_ext.first(), Option::cpp_moc_ext); s += "work/"; + s += pathtoremove; + s += QDir::separator(); s += tmpstr; s += "\n"; } else diff --git a/qmake/generators/integrity/gbuild.h b/qmake/generators/integrity/gbuild.h index 0927a2e..6f9a5c0 100644 --- a/qmake/generators/integrity/gbuild.h +++ b/qmake/generators/integrity/gbuild.h @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE class GBuildMakefileGenerator : public MakefileGenerator { - virtual bool write(); + virtual bool writeMakefile(QTextStream &text); QString projectSuffix() const { return QString(".gpj"); }; QString writeOne(QString filename, QString pathtoremove = ""); diff --git a/qmake/qmake.pri b/qmake/qmake.pri index c2fc1d5..f2a3705 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -22,7 +22,8 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \ generators/symbian/initprojectdeploy_symbian.cpp \ generators/integrity/gbuild.cpp \ windows/registry.cpp \ - symbian/epocroot.cpp + symbian/epocroot.cpp \ + generators/integrity/gbuild.cpp HEADERS += project.h property.h generators/makefile.h \ generators/unix/unixmake.h meta.h option.h cachekeys.h \ @@ -39,7 +40,8 @@ HEADERS += project.h property.h generators/makefile.h \ generators/symbian/initprojectdeploy_symbian.h \ generators/integrity/gbuild.h \ windows/registry_p.h \ - symbian/epocroot_p.h + symbian/epocroot_p.h \ + generators/integrity/gbuild.h contains(QT_EDITION, OpenSource) { DEFINES += QMAKE_OPENSOURCE_EDITION diff --git a/qmake/qmake.pro b/qmake/qmake.pro index b602afa..38e0fce 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -25,6 +25,7 @@ INCLUDEPATH += . \ generators/win32 \ generators/mac \ generators/symbian \ + generators/integrity \ $$QT_SOURCE_TREE/include \ $$QT_SOURCE_TREE/include/QtCore \ $$QT_SOURCE_TREE/qmake diff --git a/src/corelib/arch/qatomic_integrity.h b/src/corelib/arch/qatomic_integrity.h index f957297..c72a48d 100644 --- a/src/corelib/arch/qatomic_integrity.h +++ b/src/corelib/arch/qatomic_integrity.h @@ -203,7 +203,7 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) { - return TestAndSet((Address*)&_q_value, qt_addr(expectedValue), qt_addr(newValue)) == Success; + return TestAndSet(reinterpret_cast<Address *>(const_cast<T **>(&_q_value)), qt_addr(expectedValue), qt_addr(newValue)) == Success; } template <typename T> @@ -231,7 +231,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) { Address old_val; do { - old_val = *reinterpret_cast<Address *>(const_cast<T *>(newValue)); + old_val = *reinterpret_cast<Address *>(const_cast<T *>(_q_value)); } while (TestAndSet(reinterpret_cast<Address *>(const_cast<T **>(&_q_value)), old_val, qt_addr(newValue)) != Success); return reinterpret_cast<T *>(old_val); } @@ -259,7 +259,8 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) { - AtomicModify(qt_p2addr(&_q_value), qt_addr(_q_value), qt_addr(_q_value) + valueToAdd * sizeof(T)); + Address old_value; + AtomicModify(reinterpret_cast<volatile Address*>(&_q_value), &old_value, 0, valueToAdd * sizeof(T)); return _q_value; } diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index cfe5eea..e8c611b 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1824,7 +1824,7 @@ inline T *q_check_ptr(T *p) { Q_CHECK_PTR(p); return p; } #elif defined(_MSC_VER) # define Q_FUNC_INFO __FUNCSIG__ #else -# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN) +# if defined(Q_OS_SOLARIS) || defined(Q_CC_XLC) || defined(Q_OS_SYMBIAN) || defined(Q_OS_INTEGRITY) # define Q_FUNC_INFO __FILE__ "(line number unavailable)" # else /* These two macros makes it possible to turn the builtin line expander into a diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 817cd38..970d111 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -869,6 +869,7 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded if (!path.startsWith(QLatin1Char('~'))) return path; QString ret = path; +#if !defined(Q_OS_INTEGRITY) QStringList tokens = ret.split(QDir::separator()); if (tokens.first() == QLatin1String("~")) { ret.replace(0, 1, QDir::homePath()); @@ -899,6 +900,7 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded } if (expanded != 0) *expanded = true; +#endif return ret; } #endif diff --git a/src/gui/embedded/qscreenintegrityfb_qws.cpp b/src/gui/embedded/qscreenintegrityfb_qws.cpp index 6f30812..5b1e0d5 100644 --- a/src/gui/embedded/qscreenintegrityfb_qws.cpp +++ b/src/gui/embedded/qscreenintegrityfb_qws.cpp @@ -64,7 +64,8 @@ public: ~QIntfbScreenPrivate(); FBHandle handle; - struct FBInfoStruct fbinfo; + FBInfo fbinfo; + FBDriver *fbdrv; QWSMouseHandler *mouse; #ifndef QT_NO_QWS_KEYBOARD @@ -172,15 +173,14 @@ static QIntfbScreen *connected = 0; bool QIntfbScreen::connect(const QString &displaySpec) { - FBDriver *fbdev; - - CheckSuccess(gh_FB_get_driver(0, &fbdev)); - CheckSuccess(gh_FB_init_device(fbdev, 0, &d_ptr->handle)); + CheckSuccess(gh_FB_get_driver(0, &d_ptr->fbdrv)); + CheckSuccess(gh_FB_check_info(d_ptr->fbdrv, &d_ptr->fbinfo)); + CheckSuccess(gh_FB_open(d_ptr->fbdrv, &d_ptr->fbinfo, &d_ptr->handle)); CheckSuccess(gh_FB_get_info(d_ptr->handle, &d_ptr->fbinfo)); - data = (uchar *)d_ptr->fbinfo.start; + data = (uchar *)d_ptr->fbinfo.Start; - d = d_ptr->fbinfo.bitsperpixel; + d = d_ptr->fbinfo.BitsPerPixel; switch (d) { case 1: setPixelFormat(QImage::Format_Mono); @@ -205,24 +205,24 @@ bool QIntfbScreen::connect(const QString &displaySpec) #ifdef QT_QWS_DEPTH_GENERIC #if Q_BYTE_ORDER != Q_BIG_ENDIAN qt_set_generic_blit(this, 24, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - d_ptr->fbinfo.redoffset, - d_ptr->fbinfo.greenoffset, - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + d_ptr->fbinfo.Red.Offset, + d_ptr->fbinfo.Green.Offset, + d_ptr->fbinfo.Blue.Offset, + d_ptr->fbinfo.Alpha.Offset); #else qt_set_generic_blit(this, 24, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - 16 - d_ptr->fbinfo.redoffset, - 16 - d_ptr->fbinfo.greenoffset, - 16 - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + 16 - d_ptr->fbinfo.Red.Offset, + 16 - d_ptr->fbinfo.Green.Offset, + 16 - d_ptr->fbinfo.Blue.Offset, + 16 - d_ptr->fbinfo.Alpha.Offset); #endif #endif break; @@ -231,31 +231,31 @@ bool QIntfbScreen::connect(const QString &displaySpec) #ifdef QT_QWS_DEPTH_GENERIC #if Q_BYTE_ORDER != Q_BIG_ENDIAN qt_set_generic_blit(this, 32, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - d_ptr->fbinfo.redoffset, - d_ptr->fbinfo.greenoffset, - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + d_ptr->fbinfo.Red.Offset, + d_ptr->fbinfo.Green.Offset, + d_ptr->fbinfo.Blue.Offset, + d_ptr->fbinfo.Alpha.Offset); #else qt_set_generic_blit(this, 32, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - 24 - d_ptr->fbinfo.redoffset, - 24 - d_ptr->fbinfo.greenoffset, - 24 - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset ? 24 - d_ptr->fbinfo.alphaoffset : 0); + d_ptr->fbinfo.Red.Bits, + d_ptr->fbinfo.Green.Bits, + d_ptr->fbinfo.Blue.Bits, + d_ptr->fbinfo.Alpha.Bits, + 24 - d_ptr->fbinfo.Red.Offset, + 24 - d_ptr->fbinfo.Green.Offset, + 24 - d_ptr->fbinfo.Blue.Offset, + 24 - d_ptr->fbinfo.Alpha.Offset); #endif #endif break; } - dw = w = d_ptr->fbinfo.width; - dh = h = d_ptr->fbinfo.height; + dw = w = d_ptr->fbinfo.Width; + dh = h = d_ptr->fbinfo.Height; /* assumes no padding */ lstep = w * ((d + 7) >> 3); @@ -286,72 +286,6 @@ void QIntfbScreen::disconnect() bool QIntfbScreen::initDevice() { - - CheckSuccess(gh_FB_set_info(d_ptr->handle, &d_ptr->fbinfo, false)); - CheckSuccess(gh_FB_get_info(d_ptr->handle, &d_ptr->fbinfo)); - data = (uchar *)d_ptr->fbinfo.start; - d = d_ptr->fbinfo.bitsperpixel; - dw = w = d_ptr->fbinfo.width; - dh = h = d_ptr->fbinfo.height; - mapsize = d_ptr->fbinfo.length; - /* assumes no padding */ - lstep = w * ((d + 7) >> 3); - - mapsize = size = h * lstep; - - data = (uchar *)d_ptr->fbinfo.start; - - d = d_ptr->fbinfo.bitsperpixel; - switch (d) { - case 1: - setPixelFormat(QImage::Format_Mono); - break; - case 8: - setPixelFormat(QImage::Format_Indexed8); - break; - case 12: - setPixelFormat(QImage::Format_RGB444); - break; - case 15: - setPixelFormat(QImage::Format_RGB555); - break; - case 16: - setPixelFormat(QImage::Format_RGB16); - break; - case 18: - setPixelFormat(QImage::Format_RGB666); - break; - case 24: - setPixelFormat(QImage::Format_RGB888); - break; - case 32: - setPixelFormat(QImage::Format_ARGB32_Premultiplied); - break; - } -#ifdef QT_QWS_DEPTH_GENERIC -#if defined(__BIG_ENDIAN__) - qt_set_generic_blit(this, d, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - 24 - d_ptr->fbinfo.redoffset, - 24 - d_ptr->fbinfo.greenoffset, - 24 - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset ? 24 - d_ptr->fbinfo.alphaoffset : 0); -#else - qt_set_generic_blit(this, d, - d_ptr->fbinfo.redbits, - d_ptr->fbinfo.greenbits, - d_ptr->fbinfo.bluebits, - d_ptr->fbinfo.alphabits, - d_ptr->fbinfo.redoffset, - d_ptr->fbinfo.greenoffset, - d_ptr->fbinfo.blueoffset, - d_ptr->fbinfo.alphaoffset); -#endif -#endif - #ifndef QT_NO_QWS_CURSOR QScreenCursor::initSoftwareCursor(); #endif @@ -384,9 +318,9 @@ void QIntfbScreen::setDirty(const QRect& rect) FBRect fbrect; fbrect.dx = rect.x(); fbrect.dy = rect.y(); - fbrect.width = rect.width(); - fbrect.height = rect.height(); - gh_FB_expose(d_ptr->handle, &fbrect); + fbrect.Width = rect.width(); + fbrect.Height = rect.height(); + gh_FB_expose(d_ptr->handle, &fbrect, 0); } void QIntfbScreen::setBrightness(int b) diff --git a/src/src.pro b/src/src.pro index 9314fbd..c51683b 100644 --- a/src/src.pro +++ b/src/src.pro @@ -8,7 +8,7 @@ SRC_SUBDIRS += src_corelib src_xml src_network src_sql src_testlib nacl: SRC_SUBDIRS -= src_network src_testlib !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus !contains(QT_CONFIG, no-gui): SRC_SUBDIRS += src_gui -!wince*:!symbian:!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support +!wince*:!symbian:!vxworks:!integrity:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support !wince*:!symbian-abld:!symbian-sbsv2:include(tools/tools.pro) win32:!win32-g++*:SRC_SUBDIRS += src_activeqt diff --git a/tests/auto/qbytearray/qbytearray.pro b/tests/auto/qbytearray/qbytearray.pro index f195dc8..b954ca0 100644 --- a/tests/auto/qbytearray/qbytearray.pro +++ b/tests/auto/qbytearray/qbytearray.pro @@ -14,6 +14,8 @@ wince* { DEFINES += SRCDIR=\\\"./\\\" } else:symbian { TARGET.EPOCHEAPSIZE="0x100 0x800000" +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qchar/qchar.pro b/tests/auto/qchar/qchar.pro index 1681220..cbbde7c 100644 --- a/tests/auto/qchar/qchar.pro +++ b/tests/auto/qchar/qchar.pro @@ -10,6 +10,8 @@ DEPLOYMENT += deploy symbian: { DEFINES += SRCDIR="" +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qelapsedtimer/qelapsedtimer.pro b/tests/auto/qelapsedtimer/qelapsedtimer.pro index 8768876..1d74fc5 100644 --- a/tests/auto/qelapsedtimer/qelapsedtimer.pro +++ b/tests/auto/qelapsedtimer/qelapsedtimer.pro @@ -7,6 +7,8 @@ wince* { } else:symbian { # do not define SRCDIR at all TARGET.EPOCHEAPSIZE = 0x100000 0x3000000 +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qfileinfo/qfileinfo.pro b/tests/auto/qfileinfo/qfileinfo.pro index 7a2cf9c..d0e284b 100644 --- a/tests/auto/qfileinfo/qfileinfo.pro +++ b/tests/auto/qfileinfo/qfileinfo.pro @@ -26,6 +26,8 @@ wince* { DEFINES += SRCDIR=\\\"\\\" } else:symbian { # do not define SRCDIR at all +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qlibrary/qlibrary.pro b/tests/auto/qlibrary/qlibrary.pro index 5dc129f..b351753 100644 --- a/tests/auto/qlibrary/qlibrary.pro +++ b/tests/auto/qlibrary/qlibrary.pro @@ -6,6 +6,8 @@ symbian: { # Can't build two versions of lib with same name in symbian, so just build one SUBDIRS = lib2 \ tst +} else:integrity { +# no shared support, empty test } else { SUBDIRS = lib \ lib2 \ diff --git a/tests/auto/qplugin/qplugin.pro b/tests/auto/qplugin/qplugin.pro index 37a12da..1dcf0a7 100644 --- a/tests/auto/qplugin/qplugin.pro +++ b/tests/auto/qplugin/qplugin.pro @@ -22,7 +22,7 @@ mac { SUBDIRS = debugplugin releaseplugin tst_qplugin_pro.depends += debugplugin releaseplugin } -SUBDIRS += tst_qplugin.pro +!integrity:SUBDIRS += tst_qplugin.pro CONFIG += parallel_test diff --git a/tests/auto/qpluginloader/qpluginloader.pro b/tests/auto/qpluginloader/qpluginloader.pro index 6e41b4c..cb25b0f 100644 --- a/tests/auto/qpluginloader/qpluginloader.pro +++ b/tests/auto/qpluginloader/qpluginloader.pro @@ -1,10 +1,10 @@ QT = core TEMPLATE = subdirs CONFIG += ordered -SUBDIRS = lib \ +!integrity:SUBDIRS = lib \ theplugin \ tst -!win32: !macx-*: !symbian: SUBDIRS += almostplugin +!win32: !macx-*: !symbian: !integrity: SUBDIRS += almostplugin TARGET = tst_qpluginloader # no special install rule for subdir diff --git a/tests/auto/qresourceengine/qresourceengine.pro b/tests/auto/qresourceengine/qresourceengine.pro index 9ca6994..6359549 100644 --- a/tests/auto/qresourceengine/qresourceengine.pro +++ b/tests/auto/qresourceengine/qresourceengine.pro @@ -40,6 +40,8 @@ wince*|symbian:{ testsub2.path = testqrc/test/test DEPLOYMENT += deploy test alias other search1 search2 sub testsub testsub2 !symbian:DEFINES += SRCDIR=\\\"\\\" +} else:integrity { + DEFINES += SRCDIR=\"/\" } else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qsharedpointer/qsharedpointer.pro b/tests/auto/qsharedpointer/qsharedpointer.pro index 014006e..37ab4ce 100644 --- a/tests/auto/qsharedpointer/qsharedpointer.pro +++ b/tests/auto/qsharedpointer/qsharedpointer.pro @@ -9,7 +9,12 @@ HEADERS += forwarddeclared.h \ wrapper.h QT = core -!symbian:DEFINES += SRCDIR=\\\"$$PWD/\\\" + +integrity { + DEFINES += SRCDIR=\"/\" +} else:!symbian { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} include(externaltests.pri) CONFIG += parallel_test diff --git a/tests/auto/qtemporaryfile/qtemporaryfile.pro b/tests/auto/qtemporaryfile/qtemporaryfile.pro index 64a043b..4cbc76d 100644 --- a/tests/auto/qtemporaryfile/qtemporaryfile.pro +++ b/tests/auto/qtemporaryfile/qtemporaryfile.pro @@ -7,6 +7,8 @@ symbian { testData.files = tst_qtemporaryfile.cpp testData.path = . DEPLOYMENT += testData +} else:integrity { + DEFINES += SRCDIR=\"/\" }else { DEFINES += SRCDIR=\\\"$$PWD/\\\" } diff --git a/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro b/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro index 5f3cb11..c52ca52 100644 --- a/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro +++ b/tests/auto/qtextboundaryfinder/qtextboundaryfinder.pro @@ -2,7 +2,11 @@ load(qttest_p4) QT = core HEADERS += SOURCES += tst_qtextboundaryfinder.cpp -!symbian:*:DEFINES += SRCDIR=\\\"$$PWD\\\" +integrity { + DEFINES += SRCDIR=\"/\" +} else:!symbian { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} wince*|symbian:{ addFiles.files = data diff --git a/tests/auto/selftests/selftests.pro b/tests/auto/selftests/selftests.pro index 74cd075..1494e38 100644 --- a/tests/auto/selftests/selftests.pro +++ b/tests/auto/selftests/selftests.pro @@ -12,5 +12,6 @@ INSTALLS = QT = core +integrity: SUBDIRS -= test CONFIG += parallel_test |