diff options
Diffstat (limited to 'tools')
50 files changed, 571 insertions, 319 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 2464ca0..7308094 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -304,13 +304,16 @@ Configure::Configure( int& argc, char** argv ) dictionary[ "LIBJPEG" ] = "auto"; dictionary[ "LIBPNG" ] = "auto"; dictionary[ "LIBMNG" ] = "auto"; + dictionary[ "FREETYPE" ] = "no"; dictionary[ "QT3SUPPORT" ] = "yes"; dictionary[ "ACCESSIBILITY" ] = "yes"; dictionary[ "OPENGL" ] = "yes"; + dictionary[ "OPENVG" ] = "no"; dictionary[ "IPV6" ] = "yes"; // Always, dynamicly loaded dictionary[ "OPENSSL" ] = "auto"; dictionary[ "DBUS" ] = "auto"; + dictionary[ "S60" ] = "yes"; dictionary[ "STYLE_WINDOWS" ] = "yes"; dictionary[ "STYLE_WINDOWSXP" ] = "auto"; @@ -321,6 +324,7 @@ Configure::Configure( int& argc, char** argv ) dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; dictionary[ "STYLE_MOTIF" ] = "yes"; dictionary[ "STYLE_CDE" ] = "yes"; + dictionary[ "STYLE_S60" ] = "no"; dictionary[ "STYLE_GTK" ] = "no"; dictionary[ "SQL_MYSQL" ] = "no"; @@ -429,7 +433,7 @@ void Configure::parseCmdLine() } for( ; i<configCmdLine.size(); ++i ) { - bool continueElse = false; + bool continueElse[] = {false, false}; if( configCmdLine.at(i) == "-help" || configCmdLine.at(i) == "-h" || configCmdLine.at(i) == "-?" ) @@ -580,6 +584,13 @@ void Configure::parseCmdLine() dictionary[ "MNG" ] = "qt"; dictionary[ "LIBMNG" ] = "system"; } + + // Text Rendering -------------------------------------------- + else if( configCmdLine.at(i) == "-no-freetype" ) + dictionary[ "FREETYPE" ] = "no"; + else if( configCmdLine.at(i) == "-qt-freetype" ) + dictionary[ "FREETYPE" ] = "yes"; + // CE- C runtime -------------------------------------------- else if( configCmdLine.at(i) == "-crt" ) { ++i; @@ -662,14 +673,19 @@ void Configure::parseCmdLine() else if( configCmdLine.at(i) == "-no-style-cde" ) dictionary[ "STYLE_CDE" ] = "no"; + else if( configCmdLine.at(i) == "-qt-style-s60" ) + dictionary[ "STYLE_S60" ] = "yes"; + else if( configCmdLine.at(i) == "-no-style-s60" ) + dictionary[ "STYLE_S60" ] = "no"; + // Qt 3 Support --------------------------------------------- else if( configCmdLine.at(i) == "-no-qt3support" ) dictionary[ "QT3SUPPORT" ] = "no"; // Work around compiler nesting limitation else - continueElse = true; - if (!continueElse) { + continueElse[1] = true; + if (!continueElse[1]) { } // OpenGL Support ------------------------------------------- @@ -685,6 +701,14 @@ void Configure::parseCmdLine() dictionary[ "OPENGL" ] = "yes"; dictionary[ "OPENGL_ES_2" ] = "yes"; } + + // OpenVG Support ------------------------------------------- + else if( configCmdLine.at(i) == "-openvg" ) { + dictionary[ "OPENVG" ] = "yes"; + } else if( configCmdLine.at(i) == "-no-openvg" ) { + dictionary[ "OPENVG" ] = "no"; + } + // Databases ------------------------------------------------ else if( configCmdLine.at(i) == "-qt-sql-mysql" ) dictionary[ "SQL_MYSQL" ] = "yes"; @@ -772,6 +796,20 @@ void Configure::parseCmdLine() dictionary[ "INCREDIBUILD_XGE" ] = "yes"; #if !defined(EVAL) // Others --------------------------------------------------- + else if (configCmdLine.at(i) == "-fpu" ) + { + ++i; + if(i==argCount) + break; + dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i); + } + + // S60 Support ------------------------------------------- + else if( configCmdLine.at(i) == "-s60" ) + dictionary[ "S60" ] = "yes"; + else if( configCmdLine.at(i) == "-no-s60" ) + dictionary[ "S60" ] = "no"; + else if (configCmdLine.at(i) == "-fast" ) dictionary[ "FAST" ] = "yes"; else if (configCmdLine.at(i) == "-no-fast" ) @@ -868,6 +906,12 @@ void Configure::parseCmdLine() dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; } + // Work around compiler nesting limitation + else + continueElse[0] = true; + if (!continueElse[0]) { + } + else if( configCmdLine.at(i) == "-internal" ) dictionary[ "QMAKE_INTERNAL" ] = "yes"; @@ -1042,7 +1086,9 @@ void Configure::parseCmdLine() if (i == argCount) break; QString system = configCmdLine.at(i); - if (system == QLatin1String("raster") || system == QLatin1String("opengl")) + if (system == QLatin1String("raster") + || system == QLatin1String("opengl") + || system == QLatin1String("openvg")) dictionary["GRAPHICS_SYSTEM"] = configCmdLine.at(i); } @@ -1103,12 +1149,29 @@ void Configure::parseCmdLine() } else { dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++"; } + } else if ( dictionary[ "QMAKESPEC" ] == QString( "win32-mwc" ) ) { + dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-mwc"; + dictionary[ "MAKE" ] = "make"; } else { if ( dictionary[ "MAKE" ].isEmpty() ) dictionary[ "MAKE" ] = "make"; dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; } } + // Tell the user how to proceed building Qt after configure finished its job + dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"]; + if (dictionary.contains("XQMAKESPEC")) { + if (dictionary["XQMAKESPEC"].startsWith("symbian")) { + dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"] + QString(" debug-winscw|debug-armv5|release-armv5"); + } else if (dictionary["XQMAKESPEC"].startsWith("wince")) { + dictionary["QTBUILDINSTRUCTION"] = + QString("setcepaths.bat ") + dictionary["XQMAKESPEC"] + QString(" && ") + dictionary["MAKE"]; + } + } + + // Tell the user how to confclean before the next configure + dictionary["CONFCLEANINSTRUCTION"] = dictionary["MAKE"] + QString(" confclean"); + // Ensure that -spec (XQMAKESPEC) exists in the mkspecs folder as well if (dictionary.contains("XQMAKESPEC") && !mkspecs.contains(dictionary["XQMAKESPEC"], Qt::CaseInsensitive)) { @@ -1166,9 +1229,9 @@ void Configure::parseCmdLine() #if !defined(EVAL) void Configure::validateArgs() { - QStringList configs; // Validate the specified config + // Get all possible configurations from the file system. QDir dir; QStringList filters; filters << "qconfig-*.h"; @@ -1182,9 +1245,24 @@ void Configure::validateArgs() allConfigs << it->remove("qconfig-").remove(".h"); allConfigs << "full"; + // Try internal configurations first. + QStringList possible_configs = QStringList() + << "minimal" + << "small" + << "medium" + << "large" + << "full"; + int index = possible_configs.indexOf(dictionary["QCONFIG"]); + if (index >= 0) { + for (int c = 0; c <= index; c++) { + qmakeConfig += possible_configs[c] + "-config"; + } + return; + } + + // If the internal configurations failed, try others. QStringList::Iterator config; for( config = allConfigs.begin(); config != allConfigs.end(); ++config ) { - configs += (*config) + "-config"; if( (*config) == dictionary[ "QCONFIG" ] ) break; } @@ -1193,7 +1271,7 @@ void Configure::validateArgs() cout << "No such configuration \"" << qPrintable(dictionary[ "QCONFIG" ]) << "\"" << endl ; } else - qmakeConfig += configs; + qmakeConfig += (*config) + "-config"; } #endif @@ -1314,6 +1392,8 @@ void Configure::applySpecSpecifics() dictionary[ "STYLE_WINDOWSMOBILE" ] = "yes"; dictionary[ "STYLE_MOTIF" ] = "no"; dictionary[ "STYLE_CDE" ] = "no"; + dictionary[ "STYLE_S60" ] = "no"; + dictionary[ "FREETYPE" ] = "no"; dictionary[ "QT3SUPPORT" ] = "no"; dictionary[ "OPENGL" ] = "no"; dictionary[ "OPENSSL" ] = "no"; @@ -1340,6 +1420,49 @@ void Configure::applySpecSpecifics() dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; dictionary[ "QT_INSTALL_PREFIX" ] = ""; + } else if(dictionary[ "XQMAKESPEC" ].startsWith("symbian")) { + dictionary[ "ACCESSIBILITY" ] = "no"; + dictionary[ "STYLE_WINDOWSXP" ] = "no"; + dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; + dictionary[ "STYLE_PLASTIQUE" ] = "no"; + dictionary[ "STYLE_CLEANLOOKS" ] = "no"; + dictionary[ "STYLE_WINDOWSCE" ] = "no"; + dictionary[ "STYLE_WINDOWSMOBILE" ] = "no"; + dictionary[ "STYLE_MOTIF" ] = "no"; + dictionary[ "STYLE_CDE" ] = "no"; + dictionary[ "STYLE_S60" ] = "yes"; + dictionary[ "FREETYPE" ] = "no"; + dictionary[ "QT3SUPPORT" ] = "no"; + dictionary[ "OPENGL" ] = "no"; + dictionary[ "OPENSSL" ] = "yes"; + dictionary[ "STL" ] = "yes"; + dictionary[ "EXCEPTIONS" ] = "yes"; + dictionary[ "RTTI" ] = "yes"; + dictionary[ "ARCHITECTURE" ] = "symbian"; + dictionary[ "3DNOW" ] = "no"; + dictionary[ "SSE" ] = "no"; + dictionary[ "SSE2" ] = "no"; + dictionary[ "MMX" ] = "no"; + dictionary[ "IWMMXT" ] = "no"; + dictionary[ "CE_CRT" ] = "no"; + dictionary[ "DIRECT3D" ] = "no"; + dictionary[ "WEBKIT" ] = "no"; + dictionary[ "ASSISTANT_WEBKIT" ] = "no"; + dictionary[ "PHONON" ] = "yes"; + dictionary[ "XMLPATTERNS" ] = "no"; + dictionary[ "QT_GLIB" ] = "no"; + dictionary[ "S60" ] = "yes"; + // iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested) + // iconv_open seems to return -1 always, so something is probably missing from the platform. + dictionary[ "QT_ICONV" ] = "no"; + dictionary[ "SCRIPTTOOLS" ] = "no"; + dictionary[ "QT_HOST_PREFIX" ] = dictionary[ "QT_INSTALL_PREFIX" ]; + dictionary[ "QT_INSTALL_PREFIX" ] = ""; + dictionary[ "QT_INSTALL_PLUGINS" ] = "\\resource\\qt\\plugins"; + dictionary[ "ARM_FPU_TYPE" ] = "softvfp"; + dictionary[ "SQL_SQLITE" ] = "yes"; + dictionary[ "SQL_SQLITE_LIB" ] = "system"; + } else if(dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong. //TODO dictionary[ "STYLE_WINDOWSXP" ] = "no"; @@ -1433,7 +1556,7 @@ bool Configure::displayHelp() "[-no-multimedia] [-multimedia]\n" "[-no-webkit] [-webkit]\n" "[-no-scripttools] [-scripttools]\n" - "[-graphicssystem raster|opengl]\n\n", 0, 7); + "[-graphicssystem raster|opengl|openvg]\n\n", 0, 7); desc("Installation options:\n\n"); @@ -1515,6 +1638,11 @@ bool Configure::displayHelp() desc("QT3SUPPORT", "no","-no-qt3support", "Disables the Qt 3 support functionality.\n"); desc("OPENGL", "no","-no-opengl", "Disables OpenGL functionality\n"); + desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality\n"); + desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality"); + desc( "", "Requires EGL support, typically supplied by an OpenGL", false, ' '); + desc( "", "or other graphics implementation\n", false, ' '); + #endif desc( "-platform <spec>", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n"); desc( "-xplatform <spec>", "The operating system and compiler you are cross compiling to.\n"); @@ -1532,6 +1660,7 @@ bool Configure::displayHelp() "Available values for <sys>:"); desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' '); desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' '); + desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!", ' '); desc( "-help, -h, -?", "Display this information.\n"); @@ -1616,6 +1745,7 @@ bool Configure::displayHelp() "Available values for <arch>:"); desc("ARCHITECTURE","windows", "", " windows", ' '); desc("ARCHITECTURE","windowsce", "", " windowsce", ' '); + desc("ARCHITECTURE","symbian", "", " symbian", ' '); desc("ARCHITECTURE","boundschecker", "", " boundschecker", ' '); desc("ARCHITECTURE","generic", "", " generic\n", ' '); @@ -1630,7 +1760,8 @@ bool Configure::displayHelp() desc("STYLE_MOTIF", "yes", "", " motif", ' '); desc("STYLE_CDE", "yes", "", " cde", ' '); desc("STYLE_WINDOWSCE", "yes", "", " windowsce", ' '); - desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile\n", ' '); + desc("STYLE_WINDOWSMOBILE" , "yes", "", " windowsmobile", ' '); + desc("STYLE_S60" , "yes", "", " s60\n", ' '); /* We do not support -qconfig on Windows yet @@ -1659,6 +1790,13 @@ bool Configure::displayHelp() desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0"); desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE"); + // Qt\Symbian only options go below here ----------------------------------------------------------------------------- + desc("Qt for Symbian OS only:\n\n"); + desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support."); + desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt."); + desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2"); + desc("S60", "no", "-no-s60", "Do not compile in S60 support."); + desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework\n"); return true; } return false; @@ -1802,12 +1940,21 @@ bool Configure::checkAvailability(const QString &part) else if (part == "SQL_DB2") available = findFile("sqlcli.h") && findFile("sqlcli1.h") && findFile("db2cli.lib"); else if (part == "SQL_SQLITE") + if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) + available = false; // In Symbian we only support system sqlite option + else available = true; // Built in, we have a fork else if (part == "SQL_SQLITE_LIB") { if (dictionary[ "SQL_SQLITE_LIB" ] == "system") { - available = findFile("sqlite3.h") && findFile("sqlite3.lib"); - if (available) - dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; + // Symbian has multiple .lib/.dll files we need to find + if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { + available = true; // There is sqlite_symbian plugin which exports the necessary stuff + dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3"; + } else { + available = findFile("sqlite3.h") && findFile("sqlite3.lib"); + if (available) + dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; + } } else available = true; } else if (part == "SQL_SQLITE2") @@ -2008,6 +2155,15 @@ bool Configure::verifyConfiguration() if(_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout) exit(0); // Exit cleanly for Ctrl+C } + if (0 != dictionary["ARM_FPU_TYPE"].size()) + { + QStringList l= QStringList() + << "softvfp" + << "softvfp+vfpv2" + << "vfpv2"; + if (!(l.contains(dictionary["ARM_FPU_TYPE"]))) + cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl; + } return true; } @@ -2154,6 +2310,10 @@ void Configure::generateOutputVars() if( dictionary[ "LIBMNG" ] == "system" ) qtConfig += "system-mng"; + // Text rendering -------------------------------------------------- + if( dictionary[ "FREETYPE" ] == "yes" ) + qtConfig += "freetype"; + // Styles ------------------------------------------------------- if ( dictionary[ "STYLE_WINDOWS" ] == "yes" ) qmakeStyles += "windows"; @@ -2185,6 +2345,9 @@ void Configure::generateOutputVars() if ( dictionary[ "STYLE_CDE" ] == "yes" ) qmakeStyles += "cde"; + if ( dictionary[ "STYLE_S60" ] == "yes" ) + qmakeStyles += "s60"; + // Databases ---------------------------------------------------- if ( dictionary[ "SQL_MYSQL" ] == "yes" ) qmakeSql += "mysql"; @@ -2279,6 +2442,15 @@ void Configure::generateOutputVars() qtConfig += "opengles1cl"; } + if ( dictionary["OPENVG"] == "yes" ) { + qtConfig += "openvg"; + qtConfig += "egl"; + } + + if ( dictionary["S60"] == "yes" ) { + qtConfig += "s60"; + } + if ( dictionary["DIRECTSHOW"] == "yes" ) qtConfig += "directshow"; @@ -2338,6 +2510,9 @@ void Configure::generateOutputVars() } } + if (dictionary.contains("XQMAKESPEC") && ( dictionary["QMAKESPEC"] != dictionary["XQMAKESPEC"] ) ) + qmakeConfig += "cross_compile"; + // Directories and settings for .qmake.cache -------------------- // if QT_INSTALL_* have not been specified on commandline, define them now from QT_INSTALL_PREFIX @@ -2378,8 +2553,12 @@ void Configure::generateOutputVars() qmakeVars += QString("INCLUDEPATH += ") + qmakeIncludes.join( " " ); if (!opensslLibs.isEmpty()) qmakeVars += opensslLibs; - else if (dictionary[ "OPENSSL" ] == "linked") - qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); + else if (dictionary[ "OPENSSL" ] == "linked") { + if(dictionary[ "XQMAKESPEC" ].startsWith("symbian") ) + qmakeVars += QString("OPENSSL_LIBS = -llibssl -llibcrypto"); + else + qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); + } if (!qmakeSql.isEmpty()) qmakeVars += QString("sql-drivers += ") + qmakeSql.join( " " ); if (!qmakeSqlPlugins.isEmpty()) @@ -2543,6 +2722,10 @@ void Configure::generateCachefile() if (!dictionary["QT_LIBINFIX"].isEmpty()) configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl; + if(!dictionary["ARM_FPU_TYPE"].isEmpty()) { + configStream<<"QMAKE_CXXFLAGS.ARMCC += --fpu "<< dictionary["ARM_FPU_TYPE"]; + } + configStream.flush(); configFile.close(); } @@ -2582,6 +2765,18 @@ QString Configure::addDefine(QString def) } #if !defined(EVAL) +// ### This should be removed once Qt for S60 is out. +static void applyTemporarySymbianFlags(QStringList &qconfigList) +{ + qconfigList += "QT_NO_CONCURRENT"; + qconfigList += "QT_NO_QFUTURE"; + // This is removed because it uses UNIX signals which are not implemented yet + qconfigList += "QT_NO_CRASHHANDLER"; + qconfigList += "QT_NO_PRINTER"; + qconfigList += "QT_NO_CURSOR"; + qconfigList += "QT_NO_SYSTEMTRAYICON"; +} + void Configure::generateConfigfiles() { QDir(buildPath).mkpath("src/corelib/global"); @@ -2651,6 +2846,7 @@ void Configure::generateConfigfiles() if(dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA"; if(dictionary["STYLE_MOTIF"] != "yes") qconfigList += "QT_NO_STYLE_MOTIF"; if(dictionary["STYLE_CDE"] != "yes") qconfigList += "QT_NO_STYLE_CDE"; + if(dictionary["STYLE_S60"] != "yes") qconfigList += "QT_NO_STYLE_S60"; if(dictionary["STYLE_WINDOWSCE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSCE"; if(dictionary["STYLE_WINDOWSMOBILE"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSMOBILE"; if(dictionary["STYLE_GTK"] != "yes") qconfigList += "QT_NO_STYLE_GTK"; @@ -2665,10 +2861,10 @@ void Configure::generateConfigfiles() qconfigList += "QT_NO_COMPRESS"; } - if(dictionary["QT3SUPPORT"] == "no") qconfigList += "QT_NO_QT3SUPPORT"; if(dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; if(dictionary["EXCEPTIONS"] == "no") qconfigList += "QT_NO_EXCEPTIONS"; if(dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL"; + if(dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG"; if(dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; if(dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; if(dictionary["DBUS"] == "no") qconfigList += "QT_NO_DBUS"; @@ -2678,6 +2874,8 @@ void Configure::generateConfigfiles() if(dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; if(dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; if(dictionary["SCRIPTTOOLS"] == "no") qconfigList += "QT_NO_SCRIPTTOOLS"; + if(dictionary["FREETYPE"] == "no") qconfigList += "QT_NO_FREETYPE"; + if(dictionary["S60"] == "no") qconfigList += "QT_NO_S60"; if(dictionary["OPENGL_ES_CM"] == "yes" || dictionary["OPENGL_ES_CL"] == "yes" || @@ -2697,8 +2895,13 @@ void Configure::generateConfigfiles() if(dictionary["SQL_SQLITE2"] == "yes") qconfigList += "QT_SQL_SQLITE2"; if(dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE"; + if (dictionary["GRAPHICS_SYSTEM"] == "openvg") qconfigList += "QT_GRAPHICSSYSTEM_OPENVG"; if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL"; if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER"; + // ### This block should be removed once Qt for S60 is out. + if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { + applyTemporarySymbianFlags(qconfigList); + } qconfigList.sort(); for (int i = 0; i < qconfigList.count(); ++i) @@ -2930,6 +3133,7 @@ void Configure::displayConfig() cout << "SSE2 support................" << dictionary[ "SSE2" ] << endl; cout << "IWMMXT support.............." << dictionary[ "IWMMXT" ] << endl; cout << "OpenGL support.............." << dictionary[ "OPENGL" ] << endl; + cout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl; cout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl; cout << "QtDBus support.............." << dictionary[ "DBUS" ] << endl; cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl; @@ -2946,7 +3150,8 @@ void Configure::displayConfig() cout << " TIFF support............" << dictionary[ "TIFF" ] << endl; cout << " JPEG support............" << dictionary[ "JPEG" ] << endl; cout << " PNG support............." << dictionary[ "PNG" ] << endl; - cout << " MNG support............." << dictionary[ "MNG" ] << endl << endl; + cout << " MNG support............." << dictionary[ "MNG" ] << endl; + cout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl; cout << "Styles:" << endl; cout << " Windows................." << dictionary[ "STYLE_WINDOWS" ] << endl; @@ -2957,7 +3162,8 @@ void Configure::displayConfig() cout << " Motif..................." << dictionary[ "STYLE_MOTIF" ] << endl; cout << " CDE....................." << dictionary[ "STYLE_CDE" ] << endl; cout << " Windows CE.............." << dictionary[ "STYLE_WINDOWSCE" ] << endl; - cout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl << endl; + cout << " Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl; + cout << " S60....................." << dictionary[ "STYLE_S60" ] << endl << endl; cout << "Sql Drivers:" << endl; cout << " ODBC...................." << dictionary[ "SQL_ODBC" ] << endl; @@ -2989,6 +3195,10 @@ void Configure::displayConfig() cout << "Signature..................." << dictionary[ "CE_SIGNATURE"] << endl << endl; } + if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("symbian"))) { + cout << "Support for S60............." << dictionary[ "S60" ] << endl; + } + if(dictionary["ASSISTANT_WEBKIT"] == "yes") cout << "Using WebKit as html rendering engine in Qt Assistant." << endl; @@ -3134,8 +3344,10 @@ void Configure::buildHostTools() << "src/tools/bootstrap" << "src/tools/moc" << "src/tools/rcc" - << "src/tools/uic" - << "tools/checksdk"; + << "src/tools/uic"; + + if(dictionary["XQMAKESPEC"].startsWith("wince")) + hostToolsDirs << "tools/checksdk"; if (dictionary[ "CETEST" ] == "yes") hostToolsDirs << "tools/qtestlib/wince/cetest"; @@ -3358,12 +3570,15 @@ void Configure::showSummary() if (!dictionary.contains("XQMAKESPEC")) { cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl; cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; - } else { + } else if(dictionary.value("QMAKESPEC").startsWith("wince")) { // we are cross compiling for Windows CE cout << endl << endl << "Qt is now configured for building. To start the build run:" << endl << "\tsetcepaths " << dictionary.value("XQMAKESPEC") << endl << "\t" << qPrintable(make) << endl << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl; + } else { // Compiling for Symbian OS + cout << endl << endl << "Qt is now configured for building. To start the build run:" << qPrintable(dictionary["QTBUILDINSTRUCTION"]) << "." << endl + << "To reconfigure, run '" << qPrintable(dictionary["CONFCLEANINSTRUCTION"]) << "' and configure." << endl; } } @@ -3480,9 +3695,13 @@ bool Configure::showLicense(QString orgLicenseFile) void Configure::readLicense() { - dictionary[ "PLATFORM NAME" ] = (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") - && (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) - ? "Qt for Windows CE" : "Qt for Windows"; + if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") && + (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince"))) + dictionary["PLATFORM NAME"] = "Qt for Windows CE"; + else if (dictionary.value("XQMAKESPEC").startsWith("symbian")) + dictionary["PLATFORM NAME"] = "Qt for S60"; + else + dictionary["PLATFORM NAME"] = "Qt for Windows"; dictionary["LICENSE FILE"] = sourcePath; bool openSource = false; diff --git a/tools/designer/src/components/formeditor/brushmanagerproxy.cpp b/tools/designer/src/components/formeditor/brushmanagerproxy.cpp index 797e367..6789e89 100644 --- a/tools/designer/src/components/formeditor/brushmanagerproxy.cpp +++ b/tools/designer/src/components/formeditor/brushmanagerproxy.cpp @@ -146,14 +146,12 @@ QString BrushManagerProxyPrivate::uniqueBrushFileName(const QString &brushName) BrushManagerProxy::BrushManagerProxy(QDesignerFormEditorInterface *core, QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new BrushManagerProxyPrivate(this, core)) { - d_ptr = new BrushManagerProxyPrivate(this, core); } BrushManagerProxy::~BrushManagerProxy() { - delete d_ptr; } void BrushManagerProxy::setBrushManager(QtBrushManager *manager) diff --git a/tools/designer/src/components/formeditor/brushmanagerproxy.h b/tools/designer/src/components/formeditor/brushmanagerproxy.h index aef75c0..0dce13c 100644 --- a/tools/designer/src/components/formeditor/brushmanagerproxy.h +++ b/tools/designer/src/components/formeditor/brushmanagerproxy.h @@ -63,7 +63,7 @@ public: void setBrushManager(QtBrushManager *manager); private: - BrushManagerProxyPrivate *d_ptr; + QScopedPointer<BrushManagerProxyPrivate> d_ptr; Q_DECLARE_PRIVATE(BrushManagerProxy) Q_DISABLE_COPY(BrushManagerProxy) Q_PRIVATE_SLOT(d_func(), void brushAdded(const QString &, const QBrush &)) diff --git a/tools/designer/src/components/formeditor/qtbrushmanager.cpp b/tools/designer/src/components/formeditor/qtbrushmanager.cpp index a0bbb18..2b7ce3f 100644 --- a/tools/designer/src/components/formeditor/qtbrushmanager.cpp +++ b/tools/designer/src/components/formeditor/qtbrushmanager.cpp @@ -57,16 +57,13 @@ public: }; QtBrushManager::QtBrushManager(QObject *parent) - : QDesignerBrushManagerInterface(parent) + : QDesignerBrushManagerInterface(parent), d_ptr(new QtBrushManagerPrivate) { - d_ptr = new QtBrushManagerPrivate; d_ptr->q_ptr = this; - } QtBrushManager::~QtBrushManager() { - delete d_ptr; } QBrush QtBrushManager::brush(const QString &name) const diff --git a/tools/designer/src/components/formeditor/qtbrushmanager.h b/tools/designer/src/components/formeditor/qtbrushmanager.h index 6a25180..1d1542d 100644 --- a/tools/designer/src/components/formeditor/qtbrushmanager.h +++ b/tools/designer/src/components/formeditor/qtbrushmanager.h @@ -73,7 +73,7 @@ public: QPixmap brushPixmap(const QBrush &brush) const; private: - QtBrushManagerPrivate *d_ptr; + QScopedPointer<QtBrushManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtBrushManager) Q_DISABLE_COPY(QtBrushManager) }; diff --git a/tools/designer/src/lib/shared/iconselector.cpp b/tools/designer/src/lib/shared/iconselector.cpp index 8995126..b6d57a3 100644 --- a/tools/designer/src/lib/shared/iconselector.cpp +++ b/tools/designer/src/lib/shared/iconselector.cpp @@ -157,7 +157,6 @@ LanguageResourceDialog::LanguageResourceDialog(QDesignerResourceBrowserInterface LanguageResourceDialog::~LanguageResourceDialog() { - delete d_ptr; } void LanguageResourceDialog::setCurrentPath(const QString &filePath) @@ -427,9 +426,8 @@ void IconSelectorPrivate::slotResetAllActivated() // ------------- IconSelector IconSelector::IconSelector(QWidget *parent) : - QWidget(parent) + QWidget(parent), d_ptr(new IconSelectorPrivate()) { - d_ptr = new IconSelectorPrivate(); d_ptr->q_ptr = this; d_ptr->m_stateComboBox = new QComboBox(this); @@ -500,7 +498,6 @@ IconSelector::IconSelector(QWidget *parent) : IconSelector::~IconSelector() { - delete d_ptr; } void IconSelector::setIcon(const PropertySheetIconValue &icon) diff --git a/tools/designer/src/lib/shared/iconselector_p.h b/tools/designer/src/lib/shared/iconselector_p.h index 0ba313c..b2cfb3c 100644 --- a/tools/designer/src/lib/shared/iconselector_p.h +++ b/tools/designer/src/lib/shared/iconselector_p.h @@ -87,7 +87,7 @@ public: QString currentPath() const; private: - class LanguageResourceDialogPrivate *d_ptr; + QScopedPointer<class LanguageResourceDialogPrivate> d_ptr; Q_DECLARE_PRIVATE(LanguageResourceDialog) Q_DISABLE_COPY(LanguageResourceDialog) Q_PRIVATE_SLOT(d_func(), void slotAccepted()) @@ -120,7 +120,7 @@ public: signals: void iconChanged(const PropertySheetIconValue &icon); private: - class IconSelectorPrivate *d_ptr; + QScopedPointer<class IconSelectorPrivate> d_ptr; Q_DECLARE_PRIVATE(IconSelector) Q_DISABLE_COPY(IconSelector) diff --git a/tools/designer/src/lib/shared/qtresourceeditordialog.cpp b/tools/designer/src/lib/shared/qtresourceeditordialog.cpp index 04411fa..e8f5ccd 100644 --- a/tools/designer/src/lib/shared/qtresourceeditordialog.cpp +++ b/tools/designer/src/lib/shared/qtresourceeditordialog.cpp @@ -1949,9 +1949,8 @@ bool QtResourceEditorDialogPrivate::saveQrcFile(const QtQrcFileData &qrcFileData } QtResourceEditorDialog::QtResourceEditorDialog(QDesignerFormEditorInterface *core, QDesignerDialogGuiInterface *dlgGui, QWidget *parent) - : QDialog(parent) + : QDialog(parent), d_ptr(new QtResourceEditorDialogPrivate()) { - d_ptr = new QtResourceEditorDialogPrivate(); d_ptr->q_ptr = this; d_ptr->m_ui.setupUi(this); d_ptr->m_qrcManager = new QtQrcManager(this); @@ -2085,8 +2084,6 @@ QtResourceEditorDialog::~QtResourceEditorDialog() settings->setValue(QLatin1String(SplitterPosition), d_ptr->m_ui.splitter->saveState()); settings->setValue(QLatin1String(Geometry), geometry()); settings->endGroup(); - - delete d_ptr; } QtResourceModel *QtResourceEditorDialog::model() const diff --git a/tools/designer/src/lib/shared/qtresourceeditordialog_p.h b/tools/designer/src/lib/shared/qtresourceeditordialog_p.h index d67e6ab6..0676551 100644 --- a/tools/designer/src/lib/shared/qtresourceeditordialog_p.h +++ b/tools/designer/src/lib/shared/qtresourceeditordialog_p.h @@ -53,6 +53,7 @@ #ifndef QTRESOURCEEDITOR_H #define QTRESOURCEEDITOR_H +#include <QtCore/QScopedPointer> #include <QtGui/QDialog> QT_BEGIN_NAMESPACE @@ -83,7 +84,7 @@ private: QtResourceEditorDialog(QDesignerFormEditorInterface *core, QDesignerDialogGuiInterface *dlgGui, QWidget *parent = 0); ~QtResourceEditorDialog(); - class QtResourceEditorDialogPrivate *d_ptr; + QScopedPointer<class QtResourceEditorDialogPrivate> d_ptr; Q_DECLARE_PRIVATE(QtResourceEditorDialog) Q_DISABLE_COPY(QtResourceEditorDialog) diff --git a/tools/designer/src/lib/shared/qtresourcemodel.cpp b/tools/designer/src/lib/shared/qtresourcemodel.cpp index fd3b7c6..9cad683 100644 --- a/tools/designer/src/lib/shared/qtresourcemodel.cpp +++ b/tools/designer/src/lib/shared/qtresourcemodel.cpp @@ -141,7 +141,6 @@ QtResourceSet::QtResourceSet(QtResourceModel *model) : QtResourceSet::~QtResourceSet() { - delete d_ptr; } QStringList QtResourceSet::activeQrcPaths() const @@ -489,7 +488,6 @@ QtResourceModel::~QtResourceModel() while (it.hasNext()) removeResourceSet(it.next()); blockSignals(false); - delete d_ptr; } QStringList QtResourceModel::loadedQrcFiles() const diff --git a/tools/designer/src/lib/shared/qtresourcemodel_p.h b/tools/designer/src/lib/shared/qtresourcemodel_p.h index 8212bba..0cee88a 100644 --- a/tools/designer/src/lib/shared/qtresourcemodel_p.h +++ b/tools/designer/src/lib/shared/qtresourcemodel_p.h @@ -56,6 +56,7 @@ #include "shared_global_p.h" #include <QtCore/QMap> #include <QtCore/QObject> +#include <QtCore/QScopedPointer> QT_BEGIN_NAMESPACE @@ -87,7 +88,7 @@ private: ~QtResourceSet(); friend class QtResourceModel; - class QtResourceSetPrivate *d_ptr; + QScopedPointer<class QtResourceSetPrivate> d_ptr; Q_DECLARE_PRIVATE(QtResourceSet) Q_DISABLE_COPY(QtResourceSet) }; @@ -132,7 +133,7 @@ signals: private: friend class QtResourceSet; - class QtResourceModelPrivate *d_ptr; + QScopedPointer<class QtResourceModelPrivate> d_ptr; Q_DECLARE_PRIVATE(QtResourceModel) Q_DISABLE_COPY(QtResourceModel) diff --git a/tools/designer/src/lib/shared/qtresourceview.cpp b/tools/designer/src/lib/shared/qtresourceview.cpp index df105fa..60e6a3f 100644 --- a/tools/designer/src/lib/shared/qtresourceview.cpp +++ b/tools/designer/src/lib/shared/qtresourceview.cpp @@ -640,8 +640,6 @@ QtResourceView::~QtResourceView() { if (!d_ptr->m_settingsKey.isEmpty()) d_ptr->saveSettings(); - - delete d_ptr; } bool QtResourceView::event(QEvent *event) @@ -878,8 +876,6 @@ QtResourceViewDialog::~QtResourceViewDialog() settings->setValue(QLatin1String(Geometry), geometry()); settings->endGroup(); - - delete d_ptr; } QString QtResourceViewDialog::selectedResource() const diff --git a/tools/designer/src/lib/shared/qtresourceview_p.h b/tools/designer/src/lib/shared/qtresourceview_p.h index 6d7bc3f..8bec69a 100644 --- a/tools/designer/src/lib/shared/qtresourceview_p.h +++ b/tools/designer/src/lib/shared/qtresourceview_p.h @@ -102,7 +102,7 @@ protected: private: - class QtResourceViewPrivate *d_ptr; + QScopedPointer<class QtResourceViewPrivate> d_ptr; Q_DECLARE_PRIVATE(QtResourceView) Q_DISABLE_COPY(QtResourceView) Q_PRIVATE_SLOT(d_func(), void slotResourceSetActivated(QtResourceSet *)) @@ -130,7 +130,7 @@ public: void setResourceEditingEnabled(bool enable); private: - class QtResourceViewDialogPrivate *d_ptr; + QScopedPointer<class QtResourceViewDialogPrivate> d_ptr; Q_DECLARE_PRIVATE(QtResourceViewDialog) Q_DISABLE_COPY(QtResourceViewDialog) Q_PRIVATE_SLOT(d_func(), void slotResourceSelected(const QString &)) diff --git a/tools/designer/src/lib/uilib/abstractformbuilder.cpp b/tools/designer/src/lib/uilib/abstractformbuilder.cpp index 2abe5da..8c0d379 100644 --- a/tools/designer/src/lib/uilib/abstractformbuilder.cpp +++ b/tools/designer/src/lib/uilib/abstractformbuilder.cpp @@ -1698,6 +1698,24 @@ public: }; template<class T> +static void storeItemFlags(const T *item, QList<DomProperty*> *properties) +{ + static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); + static const Qt::ItemFlags defaultFlags = T().flags(); + static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags"); + + if (item->flags() != defaultFlags) { + DomProperty *p = new DomProperty; + p->setAttributeName(strings.flagsAttribute); + p->setElementSet(QString::fromAscii(itemFlags_enum.valueToKeys(item->flags()))); + properties->append(p); + } +} + +#ifndef Q_CC_RVCT +// RVCT does not accept static inline functions if one argument is templated type +// For this reason all necessary function variants are explicityly written for it. +template<class T> static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const T *item, QList<DomProperty*> *properties) { @@ -1723,21 +1741,6 @@ static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const T *i } template<class T> -static void storeItemFlags(const T *item, QList<DomProperty*> *properties) -{ - static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); - static const Qt::ItemFlags defaultFlags = T().flags(); - static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags"); - - if (item->flags() != defaultFlags) { - DomProperty *p = new DomProperty; - p->setAttributeName(strings.flagsAttribute); - p->setElementSet(QString::fromAscii(itemFlags_enum.valueToKeys(item->flags()))); - properties->append(p); - } -} - -template<class T> static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const T *item, QList<DomProperty*> *properties) { @@ -1790,6 +1793,158 @@ static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, T *it item->setFlags(enumKeysToValue<Qt::ItemFlags>(itemFlags_enum, p->elementSet().toAscii())); } +#else + +static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const QTableWidgetItem *item, + QList<DomProperty*> *properties) +{ + static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); + FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder); + + DomProperty *p; + QVariant v; + + foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) + if ((p = formBuilder->saveText(it.second, item->data(it.first.second)))) + properties->append(p); + + foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) + if ((v = item->data(it.first)).isValid() && + (p = variantToDomProperty(abstractFormBuilder, + static_cast<const QMetaObject *>(&QAbstractFormBuilderGadget::staticMetaObject), + it.second, v))) + properties->append(p); + + if ((p = formBuilder->saveResource(item->data(Qt::DecorationPropertyRole)))) + properties->append(p); +} + +static void storeItemProps(QAbstractFormBuilder *abstractFormBuilder, const QListWidgetItem *item, + QList<DomProperty*> *properties) +{ + static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); + FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder); + + DomProperty *p; + QVariant v; + + foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) + if ((p = formBuilder->saveText(it.second, item->data(it.first.second)))) + properties->append(p); + + foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) + if ((v = item->data(it.first)).isValid() && + (p = variantToDomProperty(abstractFormBuilder, + static_cast<const QMetaObject *>(&QAbstractFormBuilderGadget::staticMetaObject), + it.second, v))) + properties->append(p); + + if ((p = formBuilder->saveResource(item->data(Qt::DecorationPropertyRole)))) + properties->append(p); +} + +static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const QTableWidgetItem *item, + QList<DomProperty*> *properties) +{ + storeItemProps(abstractFormBuilder, item, properties); + storeItemFlags(item, properties); +} + +static void storeItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, const QListWidgetItem *item, + QList<DomProperty*> *properties) +{ + storeItemProps(abstractFormBuilder, item, properties); + storeItemFlags(item, properties); +} + +static void loadItemProps(QAbstractFormBuilder *abstractFormBuilder, QTableWidgetItem *item, + const QHash<QString, DomProperty*> &properties) +{ + static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); + FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder); + + DomProperty *p; + QVariant v; + + foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) + if ((p = properties.value(it.second))) { + v = formBuilder->textBuilder()->loadText(p); + QVariant nativeValue = formBuilder->textBuilder()->toNativeValue(v); + item->setData(it.first.first, qVariantValue<QString>(nativeValue)); + item->setData(it.first.second, v); + } + + foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) + if ((p = properties.value(it.second)) && + (v = formBuilder->toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid()) + item->setData(it.first, v); + + if ((p = properties.value(strings.iconAttribute))) { + v = formBuilder->resourceBuilder()->loadResource(formBuilder->workingDirectory(), p); + QVariant nativeValue = formBuilder->resourceBuilder()->toNativeValue(v); + item->setIcon(qVariantValue<QIcon>(nativeValue)); + item->setData(Qt::DecorationPropertyRole, v); + } +} + +static void loadItemProps(QAbstractFormBuilder *abstractFormBuilder, QListWidgetItem *item, + const QHash<QString, DomProperty*> &properties) +{ + static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); + FriendlyFB * const formBuilder = static_cast<FriendlyFB *>(abstractFormBuilder); + + DomProperty *p; + QVariant v; + + foreach (const QFormBuilderStrings::TextRoleNName &it, strings.itemTextRoles) + if ((p = properties.value(it.second))) { + v = formBuilder->textBuilder()->loadText(p); + QVariant nativeValue = formBuilder->textBuilder()->toNativeValue(v); + item->setData(it.first.first, qVariantValue<QString>(nativeValue)); + item->setData(it.first.second, v); + } + + foreach (const QFormBuilderStrings::RoleNName &it, strings.itemRoles) + if ((p = properties.value(it.second)) && + (v = formBuilder->toVariant(&QAbstractFormBuilderGadget::staticMetaObject, p)).isValid()) + item->setData(it.first, v); + + if ((p = properties.value(strings.iconAttribute))) { + v = formBuilder->resourceBuilder()->loadResource(formBuilder->workingDirectory(), p); + QVariant nativeValue = formBuilder->resourceBuilder()->toNativeValue(v); + item->setIcon(qVariantValue<QIcon>(nativeValue)); + item->setData(Qt::DecorationPropertyRole, v); + } +} + +static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, QTableWidgetItem *item, + const QHash<QString, DomProperty*> &properties) +{ + static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); + static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags"); + + loadItemProps(abstractFormBuilder, item, properties); + + DomProperty *p; + if ((p = properties.value(strings.flagsAttribute)) && p->kind() == DomProperty::Set) + item->setFlags(enumKeysToValue<Qt::ItemFlags>(itemFlags_enum, p->elementSet().toAscii())); +} + +static void loadItemPropsNFlags(QAbstractFormBuilder *abstractFormBuilder, QListWidgetItem *item, + const QHash<QString, DomProperty*> &properties) +{ + static const QFormBuilderStrings &strings = QFormBuilderStrings::instance(); + static const QMetaEnum itemFlags_enum = metaEnum<QAbstractFormBuilderGadget>("itemFlags"); + + loadItemProps(abstractFormBuilder, item, properties); + + DomProperty *p; + if ((p = properties.value(strings.flagsAttribute)) && p->kind() == DomProperty::Set) + item->setFlags(enumKeysToValue<Qt::ItemFlags>(itemFlags_enum, p->elementSet().toAscii())); +} + +#endif + /*! \internal */ @@ -2142,7 +2297,11 @@ void QAbstractFormBuilder::loadListWidgetExtraInfo(DomWidget *ui_widget, QListWi foreach (DomItem *ui_item, ui_widget->elementItem()) { const DomPropertyHash properties = propertyMap(ui_item->elementProperty()); QListWidgetItem *item = new QListWidgetItem(listWidget); +#ifndef Q_CC_RVCT loadItemPropsNFlags<QListWidgetItem>(this, item, properties); +#else + loadItemPropsNFlags(this, item, properties); +#endif } DomProperty *currentRow = propertyMap(ui_widget->elementProperty()).value(strings.currentRowProperty); diff --git a/tools/designer/src/src.pro b/tools/designer/src/src.pro index e7ce55f..e1710b8 100644 --- a/tools/designer/src/src.pro +++ b/tools/designer/src/src.pro @@ -10,4 +10,5 @@ SUBDIRS = \ CONFIG(shared,shared|static):SUBDIRS += plugins wince*: SUBDIRS -= designer plugins +symbian: SUBDIRS = uitools contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= lib components
\ No newline at end of file diff --git a/tools/designer/src/uitools/quiloader.cpp b/tools/designer/src/uitools/quiloader.cpp index 61b7bd6..1ec391f 100644 --- a/tools/designer/src/uitools/quiloader.cpp +++ b/tools/designer/src/uitools/quiloader.cpp @@ -647,7 +647,6 @@ QUiLoader::QUiLoader(QObject *parent) */ QUiLoader::~QUiLoader() { - delete d_ptr; } /*! diff --git a/tools/designer/src/uitools/quiloader.h b/tools/designer/src/uitools/quiloader.h index 2eeaf15..8c33fa9 100644 --- a/tools/designer/src/uitools/quiloader.h +++ b/tools/designer/src/uitools/quiloader.h @@ -43,6 +43,7 @@ #define QUILOADER_H #include <QtCore/QObject> +#include <QtCore/QScopedPointer> QT_BEGIN_HEADER @@ -90,7 +91,7 @@ public: bool isTranslationEnabled() const; private: - QUiLoaderPrivate *d_ptr; + QScopedPointer<QUiLoaderPrivate> d_ptr; Q_DECLARE_PRIVATE(QUiLoader) Q_DISABLE_COPY(QUiLoader) }; diff --git a/tools/shared/qtgradienteditor/qtcolorbutton.cpp b/tools/shared/qtgradienteditor/qtcolorbutton.cpp index c099a5b..3d9bf13 100644 --- a/tools/shared/qtgradienteditor/qtcolorbutton.cpp +++ b/tools/shared/qtgradienteditor/qtcolorbutton.cpp @@ -121,9 +121,8 @@ QPixmap QtColorButtonPrivate::generatePixmap() const /////////////// QtColorButton::QtColorButton(QWidget *parent) - : QToolButton(parent) + : QToolButton(parent), d_ptr(new QtColorButtonPrivate) { - d_ptr = new QtColorButtonPrivate; d_ptr->q_ptr = this; d_ptr->m_dragging = false; d_ptr->m_backgroundCheckered = true; @@ -136,7 +135,6 @@ QtColorButton::QtColorButton(QWidget *parent) QtColorButton::~QtColorButton() { - delete d_ptr; } void QtColorButton::setColor(const QColor &color) diff --git a/tools/shared/qtgradienteditor/qtcolorbutton.h b/tools/shared/qtgradienteditor/qtcolorbutton.h index 3b47d74..17dda74 100644 --- a/tools/shared/qtgradienteditor/qtcolorbutton.h +++ b/tools/shared/qtgradienteditor/qtcolorbutton.h @@ -75,7 +75,7 @@ protected: void dropEvent(QDropEvent *event); #endif private: - class QtColorButtonPrivate *d_ptr; + QScopedPointer<class QtColorButtonPrivate> d_ptr; Q_DECLARE_PRIVATE(QtColorButton) Q_DISABLE_COPY(QtColorButton) Q_PRIVATE_SLOT(d_func(), void slotEditColor()) diff --git a/tools/shared/qtgradienteditor/qtcolorline.cpp b/tools/shared/qtgradienteditor/qtcolorline.cpp index 5294df0..6d6c2a0 100644 --- a/tools/shared/qtgradienteditor/qtcolorline.cpp +++ b/tools/shared/qtgradienteditor/qtcolorline.cpp @@ -999,9 +999,8 @@ void QtColorLinePrivate::mouseDoubleClickEvent(QMouseEvent *event) //////////////////////////////////////////////////// QtColorLine::QtColorLine(QWidget *parent) - : QWidget(parent) + : QWidget(parent), d_ptr(new QtColorLinePrivate) { - d_ptr = new QtColorLinePrivate; d_ptr->q_ptr = this; setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); @@ -1009,7 +1008,6 @@ QtColorLine::QtColorLine(QWidget *parent) QtColorLine::~QtColorLine() { - delete d_ptr; } QSize QtColorLine::minimumSizeHint() const diff --git a/tools/shared/qtgradienteditor/qtcolorline.h b/tools/shared/qtgradienteditor/qtcolorline.h index 811dcd0..4819629 100644 --- a/tools/shared/qtgradienteditor/qtcolorline.h +++ b/tools/shared/qtgradienteditor/qtcolorline.h @@ -114,7 +114,7 @@ protected: private: - class QtColorLinePrivate *d_ptr; + QScopedPointer<class QtColorLinePrivate> d_ptr; Q_DECLARE_PRIVATE(QtColorLine) Q_DISABLE_COPY(QtColorLine) }; diff --git a/tools/shared/qtgradienteditor/qtgradientdialog.cpp b/tools/shared/qtgradienteditor/qtgradientdialog.cpp index c12c222..32eb458 100644 --- a/tools/shared/qtgradienteditor/qtgradientdialog.cpp +++ b/tools/shared/qtgradienteditor/qtgradientdialog.cpp @@ -196,10 +196,9 @@ void QtGradientDialogPrivate::slotAboutToShowDetails(bool details, int extension */ QtGradientDialog::QtGradientDialog(QWidget *parent) - : QDialog(parent) + : QDialog(parent), d_ptr(new QtGradientDialogPrivate()) { // setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); - d_ptr = new QtGradientDialogPrivate(); d_ptr->q_ptr = this; d_ptr->m_ui.setupUi(this); QPushButton *button = d_ptr->m_ui.buttonBox->button(QDialogButtonBox::Ok); @@ -218,7 +217,6 @@ QtGradientDialog::QtGradientDialog(QWidget *parent) QtGradientDialog::~QtGradientDialog() { - delete d_ptr; } /*! diff --git a/tools/shared/qtgradienteditor/qtgradientdialog.h b/tools/shared/qtgradienteditor/qtgradientdialog.h index d8570d6..9094930 100644 --- a/tools/shared/qtgradienteditor/qtgradientdialog.h +++ b/tools/shared/qtgradienteditor/qtgradientdialog.h @@ -76,7 +76,7 @@ public: static QGradient getGradient(bool *ok, QWidget *parent = 0, const QString &caption = QString()); private: - class QtGradientDialogPrivate *d_ptr; + QScopedPointer<class QtGradientDialogPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGradientDialog) Q_DISABLE_COPY(QtGradientDialog) Q_PRIVATE_SLOT(d_func(), void slotAboutToShowDetails(bool details, int extensionWidthHint)) diff --git a/tools/shared/qtgradienteditor/qtgradienteditor.cpp b/tools/shared/qtgradienteditor/qtgradienteditor.cpp index 3a0806f..4a407d8 100644 --- a/tools/shared/qtgradienteditor/qtgradienteditor.cpp +++ b/tools/shared/qtgradienteditor/qtgradienteditor.cpp @@ -723,9 +723,8 @@ void QtGradientEditorPrivate::setAngleConical(qreal angle) } QtGradientEditor::QtGradientEditor(QWidget *parent) - : QWidget(parent) + : QWidget(parent), d_ptr(new QtGradientEditorPrivate()) { - d_ptr = new QtGradientEditorPrivate(); d_ptr->q_ptr = this; d_ptr->m_type = QGradient::RadialGradient; d_ptr->m_ui.setupUi(this); @@ -831,7 +830,6 @@ QtGradientEditor::~QtGradientEditor() { if (d_ptr->m_hiddenWidget) delete d_ptr->m_hiddenWidget; - delete d_ptr; } void QtGradientEditor::setGradient(const QGradient &grad) diff --git a/tools/shared/qtgradienteditor/qtgradienteditor.h b/tools/shared/qtgradienteditor/qtgradienteditor.h index b7be034..a851849 100644 --- a/tools/shared/qtgradienteditor/qtgradienteditor.h +++ b/tools/shared/qtgradienteditor/qtgradienteditor.h @@ -78,7 +78,7 @@ signals: void aboutToShowDetails(bool details, int extenstionWidthHint); private: - class QtGradientEditorPrivate *d_ptr; + QScopedPointer<class QtGradientEditorPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGradientEditor) Q_DISABLE_COPY(QtGradientEditor) Q_PRIVATE_SLOT(d_func(), void slotGradientStopsChanged(const QGradientStops &stops)) diff --git a/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp b/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp index 96fe5d9..15a5381 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp +++ b/tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp @@ -590,9 +590,8 @@ void QtGradientStopsControllerPrivate::slotZoomChanged(double zoom) } QtGradientStopsController::QtGradientStopsController(QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new QtGradientStopsControllerPrivate()) { - d_ptr = new QtGradientStopsControllerPrivate(); d_ptr->q_ptr = this; d_ptr->m_spec = QColor::Hsv; @@ -671,7 +670,6 @@ void QtGradientStopsController::setUi(Ui::QtGradientEditor *ui) QtGradientStopsController::~QtGradientStopsController() { - delete d_ptr; } void QtGradientStopsController::setGradientStops(const QGradientStops &stops) diff --git a/tools/shared/qtgradienteditor/qtgradientstopscontroller.h b/tools/shared/qtgradienteditor/qtgradientstopscontroller.h index afc8d5c..bff911a 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopscontroller.h +++ b/tools/shared/qtgradienteditor/qtgradientstopscontroller.h @@ -70,7 +70,7 @@ signals: void gradientStopsChanged(const QGradientStops &stops); private: - class QtGradientStopsControllerPrivate *d_ptr; + QScopedPointer<class QtGradientStopsControllerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGradientStopsController) Q_DISABLE_COPY(QtGradientStopsController) Q_PRIVATE_SLOT(d_func(), void slotHsvClicked()) diff --git a/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp b/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp index b7f5c6f..0aadddf 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp +++ b/tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp @@ -78,8 +78,8 @@ void QtGradientStop::setPosition(qreal position) } QtGradientStop::QtGradientStop(QtGradientStopsModel *model) + : d_ptr(new QtGradientStopPrivate()) { - d_ptr = new QtGradientStopPrivate(); d_ptr->m_position = 0; d_ptr->m_color = Qt::white; d_ptr->m_model = model; @@ -87,7 +87,6 @@ QtGradientStop::QtGradientStop(QtGradientStopsModel *model) QtGradientStop::~QtGradientStop() { - delete d_ptr; } class QtGradientStopsModelPrivate @@ -104,9 +103,8 @@ public: QtGradientStopsModel::QtGradientStopsModel(QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new QtGradientStopsModelPrivate) { - d_ptr = new QtGradientStopsModelPrivate; d_ptr->q_ptr = this; d_ptr->m_current = 0; } @@ -114,7 +112,6 @@ QtGradientStopsModel::QtGradientStopsModel(QObject *parent) QtGradientStopsModel::~QtGradientStopsModel() { clear(); - delete d_ptr; } QtGradientStopsModel::PositionStopMap QtGradientStopsModel::stops() const diff --git a/tools/shared/qtgradienteditor/qtgradientstopsmodel.h b/tools/shared/qtgradienteditor/qtgradientstopsmodel.h index 0b5c778..c14958c 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopsmodel.h +++ b/tools/shared/qtgradienteditor/qtgradientstopsmodel.h @@ -64,7 +64,7 @@ private: friend class QtGradientStopsModel; QtGradientStop(QtGradientStopsModel *model = 0); ~QtGradientStop(); - class QtGradientStopPrivate *d_ptr; + QScopedPointer<class QtGradientStopPrivate> d_ptr; }; class QtGradientStopsModel : public QObject @@ -111,7 +111,7 @@ signals: void currentStopChanged(QtGradientStop *stop); private: - class QtGradientStopsModelPrivate *d_ptr; + QScopedPointer<class QtGradientStopsModelPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGradientStopsModel) Q_DISABLE_COPY(QtGradientStopsModel) }; diff --git a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp index 9552185..aaecc85 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp +++ b/tools/shared/qtgradienteditor/qtgradientstopswidget.cpp @@ -360,9 +360,8 @@ void QtGradientStopsWidgetPrivate::slotResetZoom() } QtGradientStopsWidget::QtGradientStopsWidget(QWidget *parent) - : QAbstractScrollArea(parent) + : QAbstractScrollArea(parent), d_ptr(new QtGradientStopsWidgetPrivate) { - d_ptr = new QtGradientStopsWidgetPrivate; d_ptr->q_ptr = this; d_ptr->m_backgroundCheckered = true; d_ptr->m_model = 0; @@ -391,7 +390,6 @@ QtGradientStopsWidget::QtGradientStopsWidget(QWidget *parent) QtGradientStopsWidget::~QtGradientStopsWidget() { - delete d_ptr; } QSize QtGradientStopsWidget::sizeHint() const diff --git a/tools/shared/qtgradienteditor/qtgradientstopswidget.h b/tools/shared/qtgradienteditor/qtgradientstopswidget.h index c106f33..199fe10 100644 --- a/tools/shared/qtgradienteditor/qtgradientstopswidget.h +++ b/tools/shared/qtgradienteditor/qtgradientstopswidget.h @@ -91,7 +91,7 @@ protected: #endif private: - QtGradientStopsWidgetPrivate *d_ptr; + QScopedPointer<QtGradientStopsWidgetPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGradientStopsWidget) Q_DISABLE_COPY(QtGradientStopsWidget) Q_PRIVATE_SLOT(d_func(), void slotStopAdded(QtGradientStop *stop)) diff --git a/tools/shared/qtgradienteditor/qtgradientwidget.cpp b/tools/shared/qtgradienteditor/qtgradientwidget.cpp index 49cb181..3e62f6d 100644 --- a/tools/shared/qtgradienteditor/qtgradientwidget.cpp +++ b/tools/shared/qtgradienteditor/qtgradientwidget.cpp @@ -232,9 +232,8 @@ void QtGradientWidgetPrivate::setupDrag(QtGradientStop *stop, int x) //////////////////////////// QtGradientWidget::QtGradientWidget(QWidget *parent) - : QWidget(parent) + : QWidget(parent), d_ptr(new QtGradientWidgetPrivate) { - d_ptr = new QtGradientWidgetPrivate; d_ptr->q_ptr = this; d_ptr->m_backgroundCheckered = true; d_ptr->m_handleSize = 20.0; @@ -253,7 +252,6 @@ QtGradientWidget::QtGradientWidget(QWidget *parent) QtGradientWidget::~QtGradientWidget() { - delete d_ptr; } QSize QtGradientWidget::sizeHint() const diff --git a/tools/shared/qtgradienteditor/qtgradientwidget.h b/tools/shared/qtgradienteditor/qtgradientwidget.h index 2f71212..590a8f1 100644 --- a/tools/shared/qtgradienteditor/qtgradientwidget.h +++ b/tools/shared/qtgradienteditor/qtgradientwidget.h @@ -110,7 +110,7 @@ protected: void mouseDoubleClickEvent(QMouseEvent *e); private: - class QtGradientWidgetPrivate *d_ptr; + QScopedPointer<class QtGradientWidgetPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGradientWidget) Q_DISABLE_COPY(QtGradientWidget) }; diff --git a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp index bd5736f..15d9b00 100644 --- a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp @@ -547,9 +547,8 @@ void QtButtonPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtButtonPropertyBrowser::QtButtonPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtButtonPropertyBrowserPrivate) { - d_ptr = new QtButtonPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -570,7 +569,6 @@ QtButtonPropertyBrowser::~QtButtonPropertyBrowser() const QMap<QtButtonPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap<QtButtonPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h index 40e81fa..a0cb3bf 100644 --- a/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h @@ -71,7 +71,7 @@ protected: private: - QtButtonPropertyBrowserPrivate *d_ptr; + QScopedPointer<QtButtonPropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) Q_DISABLE_COPY(QtButtonPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotUpdate()) diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.cpp b/tools/shared/qtpropertybrowser/qteditorfactory.cpp index 68e1d7d..2e85706 100644 --- a/tools/shared/qtpropertybrowser/qteditorfactory.cpp +++ b/tools/shared/qtpropertybrowser/qteditorfactory.cpp @@ -227,9 +227,8 @@ void QtSpinBoxFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory<QtIntPropertyManager>(parent) + : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtSpinBoxFactoryPrivate()) { - d_ptr = new QtSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -240,7 +239,6 @@ QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) QtSpinBoxFactory::~QtSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -383,9 +381,8 @@ void QtSliderFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtSliderFactory::QtSliderFactory(QObject *parent) - : QtAbstractEditorFactory<QtIntPropertyManager>(parent) + : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtSliderFactoryPrivate()) { - d_ptr = new QtSliderFactoryPrivate(); d_ptr->q_ptr = this; } @@ -396,7 +393,6 @@ QtSliderFactory::QtSliderFactory(QObject *parent) QtSliderFactory::~QtSliderFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -539,9 +535,8 @@ void QtScrollBarFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) - : QtAbstractEditorFactory<QtIntPropertyManager>(parent) + : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtScrollBarFactoryPrivate()) { - d_ptr = new QtScrollBarFactoryPrivate(); d_ptr->q_ptr = this; } @@ -552,7 +547,6 @@ QtScrollBarFactory::QtScrollBarFactory(QObject *parent) QtScrollBarFactory::~QtScrollBarFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -661,9 +655,8 @@ void QtCheckBoxFactoryPrivate::slotSetValue(bool value) Creates a factory with the given \a parent. */ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) - : QtAbstractEditorFactory<QtBoolPropertyManager>(parent) + : QtAbstractEditorFactory<QtBoolPropertyManager>(parent), d_ptr(new QtCheckBoxFactoryPrivate()) { - d_ptr = new QtCheckBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -674,7 +667,6 @@ QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) QtCheckBoxFactory::~QtCheckBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -836,9 +828,8 @@ void QtDoubleSpinBoxFactoryPrivate::slotSetValue(double value) Creates a factory with the given \a parent. */ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) - : QtAbstractEditorFactory<QtDoublePropertyManager>(parent) + : QtAbstractEditorFactory<QtDoublePropertyManager>(parent), d_ptr(new QtDoubleSpinBoxFactoryPrivate()) { - d_ptr = new QtDoubleSpinBoxFactoryPrivate(); d_ptr->q_ptr = this; } @@ -849,7 +840,6 @@ QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) QtDoubleSpinBoxFactory::~QtDoubleSpinBoxFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -991,9 +981,8 @@ void QtLineEditFactoryPrivate::slotSetValue(const QString &value) Creates a factory with the given \a parent. */ QtLineEditFactory::QtLineEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtStringPropertyManager>(parent) + : QtAbstractEditorFactory<QtStringPropertyManager>(parent), d_ptr(new QtLineEditFactoryPrivate()) { - d_ptr = new QtLineEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1004,7 +993,6 @@ QtLineEditFactory::QtLineEditFactory(QObject *parent) QtLineEditFactory::~QtLineEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1134,9 +1122,8 @@ void QtDateEditFactoryPrivate::slotSetValue(const QDate &value) Creates a factory with the given \a parent. */ QtDateEditFactory::QtDateEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtDatePropertyManager>(parent) + : QtAbstractEditorFactory<QtDatePropertyManager>(parent), d_ptr(new QtDateEditFactoryPrivate()) { - d_ptr = new QtDateEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1147,7 +1134,6 @@ QtDateEditFactory::QtDateEditFactory(QObject *parent) QtDateEditFactory::~QtDateEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1252,9 +1238,8 @@ void QtTimeEditFactoryPrivate::slotSetValue(const QTime &value) Creates a factory with the given \a parent. */ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtTimePropertyManager>(parent) + : QtAbstractEditorFactory<QtTimePropertyManager>(parent), d_ptr(new QtTimeEditFactoryPrivate()) { - d_ptr = new QtTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1265,7 +1250,6 @@ QtTimeEditFactory::QtTimeEditFactory(QObject *parent) QtTimeEditFactory::~QtTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1367,9 +1351,8 @@ void QtDateTimeEditFactoryPrivate::slotSetValue(const QDateTime &value) Creates a factory with the given \a parent. */ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) - : QtAbstractEditorFactory<QtDateTimePropertyManager>(parent) + : QtAbstractEditorFactory<QtDateTimePropertyManager>(parent), d_ptr(new QtDateTimeEditFactoryPrivate()) { - d_ptr = new QtDateTimeEditFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1380,7 +1363,6 @@ QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) QtDateTimeEditFactory::~QtDateTimeEditFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1481,9 +1463,8 @@ void QtKeySequenceEditorFactoryPrivate::slotSetValue(const QKeySequence &value) Creates a factory with the given \a parent. */ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtKeySequencePropertyManager>(parent) + : QtAbstractEditorFactory<QtKeySequencePropertyManager>(parent), d_ptr(new QtKeySequenceEditorFactoryPrivate()) { - d_ptr = new QtKeySequenceEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1494,7 +1475,6 @@ QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) QtKeySequenceEditorFactory::~QtKeySequenceEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1765,9 +1745,8 @@ void QtCharEditorFactoryPrivate::slotSetValue(const QChar &value) Creates a factory with the given \a parent. */ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtCharPropertyManager>(parent) + : QtAbstractEditorFactory<QtCharPropertyManager>(parent), d_ptr(new QtCharEditorFactoryPrivate()) { - d_ptr = new QtCharEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1778,7 +1757,6 @@ QtCharEditorFactory::QtCharEditorFactory(QObject *parent) QtCharEditorFactory::~QtCharEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -1929,9 +1907,8 @@ void QtEnumEditorFactoryPrivate::slotSetValue(int value) Creates a factory with the given \a parent. */ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtEnumPropertyManager>(parent) + : QtAbstractEditorFactory<QtEnumPropertyManager>(parent), d_ptr(new QtEnumEditorFactoryPrivate()) { - d_ptr = new QtEnumEditorFactoryPrivate(); d_ptr->q_ptr = this; } @@ -1942,7 +1919,6 @@ QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) QtEnumEditorFactory::~QtEnumEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -2094,9 +2070,8 @@ void QtCursorEditorFactoryPrivate::slotEditorDestroyed(QObject *object) Creates a factory with the given \a parent. */ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtCursorPropertyManager>(parent) + : QtAbstractEditorFactory<QtCursorPropertyManager>(parent), d_ptr(new QtCursorEditorFactoryPrivate()) { - d_ptr = new QtCursorEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_enumEditorFactory = new QtEnumEditorFactory(this); @@ -2111,7 +2086,6 @@ QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) */ QtCursorEditorFactory::~QtCursorEditorFactory() { - delete d_ptr; } /*! @@ -2328,7 +2302,6 @@ QtColorEditorFactory::QtColorEditorFactory(QObject *parent) : QtColorEditorFactory::~QtColorEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! @@ -2542,7 +2515,6 @@ QtFontEditorFactory::QtFontEditorFactory(QObject *parent) : QtFontEditorFactory::~QtFontEditorFactory() { qDeleteAll(d_ptr->m_editorToProperty.keys()); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qteditorfactory.h b/tools/shared/qtpropertybrowser/qteditorfactory.h index ae0658f..9738978 100644 --- a/tools/shared/qtpropertybrowser/qteditorfactory.h +++ b/tools/shared/qtpropertybrowser/qteditorfactory.h @@ -60,7 +60,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtSpinBoxFactoryPrivate *d_ptr; + QScopedPointer<QtSpinBoxFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSpinBoxFactory) Q_DISABLE_COPY(QtSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -84,7 +84,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtSliderFactoryPrivate *d_ptr; + QScopedPointer<QtSliderFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSliderFactory) Q_DISABLE_COPY(QtSliderFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -108,7 +108,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtIntPropertyManager *manager); private: - QtScrollBarFactoryPrivate *d_ptr; + QScopedPointer<QtScrollBarFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtScrollBarFactory) Q_DISABLE_COPY(QtScrollBarFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -132,7 +132,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtBoolPropertyManager *manager); private: - QtCheckBoxFactoryPrivate *d_ptr; + QScopedPointer<QtCheckBoxFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCheckBoxFactory) Q_DISABLE_COPY(QtCheckBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, bool)) @@ -154,7 +154,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtDoublePropertyManager *manager); private: - QtDoubleSpinBoxFactoryPrivate *d_ptr; + QScopedPointer<QtDoubleSpinBoxFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory) Q_DISABLE_COPY(QtDoubleSpinBoxFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, double)) @@ -179,7 +179,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtStringPropertyManager *manager); private: - QtLineEditFactoryPrivate *d_ptr; + QScopedPointer<QtLineEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtLineEditFactory) Q_DISABLE_COPY(QtLineEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QString &)) @@ -202,7 +202,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtDatePropertyManager *manager); private: - QtDateEditFactoryPrivate *d_ptr; + QScopedPointer<QtDateEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDateEditFactory) Q_DISABLE_COPY(QtDateEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDate &)) @@ -226,7 +226,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtTimePropertyManager *manager); private: - QtTimeEditFactoryPrivate *d_ptr; + QScopedPointer<QtTimeEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtTimeEditFactory) Q_DISABLE_COPY(QtTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QTime &)) @@ -248,7 +248,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtDateTimePropertyManager *manager); private: - QtDateTimeEditFactoryPrivate *d_ptr; + QScopedPointer<QtDateTimeEditFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDateTimeEditFactory) Q_DISABLE_COPY(QtDateTimeEditFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QDateTime &)) @@ -270,7 +270,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtKeySequencePropertyManager *manager); private: - QtKeySequenceEditorFactoryPrivate *d_ptr; + QScopedPointer<QtKeySequenceEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory) Q_DISABLE_COPY(QtKeySequenceEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QKeySequence &)) @@ -292,7 +292,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtCharPropertyManager *manager); private: - QtCharEditorFactoryPrivate *d_ptr; + QScopedPointer<QtCharEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCharEditorFactory) Q_DISABLE_COPY(QtCharEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QChar &)) @@ -314,7 +314,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtEnumPropertyManager *manager); private: - QtEnumEditorFactoryPrivate *d_ptr; + QScopedPointer<QtEnumEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtEnumEditorFactory) Q_DISABLE_COPY(QtEnumEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, int)) @@ -340,7 +340,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtCursorPropertyManager *manager); private: - QtCursorEditorFactoryPrivate *d_ptr; + QScopedPointer<QtCursorEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCursorEditorFactory) Q_DISABLE_COPY(QtCursorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QCursor &)) @@ -362,7 +362,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtColorPropertyManager *manager); private: - QtColorEditorFactoryPrivate *d_ptr; + QScopedPointer<QtColorEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtColorEditorFactory) Q_DISABLE_COPY(QtColorEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QColor &)) @@ -384,7 +384,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtFontPropertyManager *manager); private: - QtFontEditorFactoryPrivate *d_ptr; + QScopedPointer<QtFontEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtFontEditorFactory) Q_DISABLE_COPY(QtFontEditorFactory) Q_PRIVATE_SLOT(d_func(), void slotPropertyChanged(QtProperty *, const QFont &)) diff --git a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp index 2e9fc2d..c285e4e 100644 --- a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp @@ -476,9 +476,8 @@ void QtGroupBoxPropertyBrowserPrivate::updateItem(WidgetItem *item) Creates a property browser with the given \a parent. */ QtGroupBoxPropertyBrowser::QtGroupBoxPropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtGroupBoxPropertyBrowserPrivate) { - d_ptr = new QtGroupBoxPropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -499,7 +498,6 @@ QtGroupBoxPropertyBrowser::~QtGroupBoxPropertyBrowser() const QMap<QtGroupBoxPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator icend = d_ptr->m_itemToIndex.constEnd(); for (QMap<QtGroupBoxPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) delete it.key(); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h index 7bdb16b..82a688c 100644 --- a/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h @@ -63,7 +63,7 @@ protected: private: - QtGroupBoxPropertyBrowserPrivate *d_ptr; + QScopedPointer<QtGroupBoxPropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotUpdate()) diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp index ace1015..a591f0b 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.cpp @@ -142,8 +142,8 @@ public: \sa QtAbstractPropertyManager::addProperty() */ QtProperty::QtProperty(QtAbstractPropertyManager *manager) + : d_ptr(new QtPropertyPrivate(manager)) { - d_ptr = new QtPropertyPrivate(manager); d_ptr->q_ptr = this; } @@ -177,7 +177,6 @@ QtProperty::~QtProperty() QtProperty *property = itParent.next(); property->d_ptr->m_subItems.removeAll(this); } - delete d_ptr; } /*! @@ -638,9 +637,8 @@ void QtAbstractPropertyManagerPrivate::propertyInserted(QtProperty *property, Creates an abstract property manager with the given \a parent. */ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new QtAbstractPropertyManagerPrivate) { - d_ptr = new QtAbstractPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -652,7 +650,6 @@ QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) QtAbstractPropertyManager::~QtAbstractPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1167,14 +1164,13 @@ QtAbstractPropertyBrowser *QtBrowserItem::browser() const } QtBrowserItem::QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent) + : d_ptr(new QtBrowserItemPrivate(browser, property, parent)) { - d_ptr = new QtBrowserItemPrivate(browser, property, parent); d_ptr->q_ptr = this; } QtBrowserItem::~QtBrowserItem() { - delete d_ptr; } @@ -1646,9 +1642,8 @@ void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *prope Creates an abstract property browser with the given \a parent. */ QtAbstractPropertyBrowser::QtAbstractPropertyBrowser(QWidget *parent) - : QWidget(parent) + : QWidget(parent), d_ptr(new QtAbstractPropertyBrowserPrivate) { - d_ptr = new QtAbstractPropertyBrowserPrivate; d_ptr->q_ptr = this; } @@ -1671,7 +1666,6 @@ QtAbstractPropertyBrowser::~QtAbstractPropertyBrowser() QListIterator<QtBrowserItem *> itItem(indexes); while (itItem.hasNext()) d_ptr->clearIndex(itItem.next()); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowser.h b/tools/shared/qtpropertybrowser/qtpropertybrowser.h index 2d427da..0cecd4d 100644 --- a/tools/shared/qtpropertybrowser/qtpropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qtpropertybrowser.h @@ -85,7 +85,7 @@ protected: void propertyChanged(); private: friend class QtAbstractPropertyManager; - QtPropertyPrivate *d_ptr; + QScopedPointer<QtPropertyPrivate> d_ptr; }; class QtAbstractPropertyManagerPrivate; @@ -118,7 +118,7 @@ protected: virtual QtProperty *createProperty(); private: friend class QtProperty; - QtAbstractPropertyManagerPrivate *d_ptr; + QScopedPointer<QtAbstractPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyManager) Q_DISABLE_COPY(QtAbstractPropertyManager) }; @@ -235,7 +235,7 @@ public: private: explicit QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent); ~QtBrowserItem(); - QtBrowserItemPrivate *d_ptr; + QScopedPointer<QtBrowserItemPrivate> d_ptr; friend class QtAbstractPropertyBrowserPrivate; }; @@ -292,7 +292,7 @@ private: bool addFactory(QtAbstractPropertyManager *abstractManager, QtAbstractEditorFactoryBase *abstractFactory); - QtAbstractPropertyBrowserPrivate *d_ptr; + QScopedPointer<QtAbstractPropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyBrowser) Q_DISABLE_COPY(QtAbstractPropertyBrowser) Q_PRIVATE_SLOT(d_func(), void slotPropertyInserted(QtProperty *, diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp index ccf9c0a..87ea5d4 100644 --- a/tools/shared/qtpropertybrowser/qtpropertymanager.cpp +++ b/tools/shared/qtpropertybrowser/qtpropertymanager.cpp @@ -677,9 +677,8 @@ public: Creates a manager with the given \a parent. */ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtIntPropertyManagerPrivate) { - d_ptr = new QtIntPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -689,7 +688,6 @@ QtIntPropertyManager::QtIntPropertyManager(QObject *parent) QtIntPropertyManager::~QtIntPropertyManager() { clear(); - delete d_ptr; } /*! @@ -762,7 +760,7 @@ QString QtIntPropertyManager::valueText(const QtProperty *property) const void QtIntPropertyManager::setValue(QtProperty *property, int val) { void (QtIntPropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, int) = 0; - setValueInRange<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr, + setValueInRange<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -779,7 +777,7 @@ void QtIntPropertyManager::setValue(QtProperty *property, int val) */ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) { - setMinimumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr, + setMinimumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -797,7 +795,7 @@ void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) */ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) { - setMaximumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr, + setMaximumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -821,7 +819,7 @@ void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) void QtIntPropertyManager::setRange(QtProperty *property, int minVal, int maxVal) { void (QtIntPropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, int, int, int) = 0; - setBorderValues<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr, + setBorderValues<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr.data(), &QtIntPropertyManager::propertyChanged, &QtIntPropertyManager::valueChanged, &QtIntPropertyManager::rangeChanged, @@ -968,9 +966,8 @@ public: Creates a manager with the given \a parent. */ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDoublePropertyManagerPrivate) { - d_ptr = new QtDoublePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -980,7 +977,6 @@ QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) QtDoublePropertyManager::~QtDoublePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1063,7 +1059,7 @@ QString QtDoublePropertyManager::valueText(const QtProperty *property) const void QtDoublePropertyManager::setValue(QtProperty *property, double val) { void (QtDoublePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, double) = 0; - setValueInRange<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr, + setValueInRange<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1140,7 +1136,7 @@ void QtDoublePropertyManager::setDecimals(QtProperty *property, int prec) */ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) { - setMinimumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr, + setMinimumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1158,7 +1154,7 @@ void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) */ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) { - setMaximumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr, + setMaximumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1182,7 +1178,7 @@ void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) void QtDoublePropertyManager::setRange(QtProperty *property, double minVal, double maxVal) { void (QtDoublePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, double, double, double) = 0; - setBorderValues<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr, + setBorderValues<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr.data(), &QtDoublePropertyManager::propertyChanged, &QtDoublePropertyManager::valueChanged, &QtDoublePropertyManager::rangeChanged, @@ -1273,9 +1269,8 @@ public: Creates a manager with the given \a parent. */ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtStringPropertyManagerPrivate) { - d_ptr = new QtStringPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1285,7 +1280,6 @@ QtStringPropertyManager::QtStringPropertyManager(QObject *parent) QtStringPropertyManager::~QtStringPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1437,9 +1431,8 @@ public: Creates a manager with the given \a parent. */ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtBoolPropertyManagerPrivate) { - d_ptr = new QtBoolPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -1449,7 +1442,6 @@ QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) QtBoolPropertyManager::~QtBoolPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1630,9 +1622,8 @@ public: Creates a manager with the given \a parent. */ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDatePropertyManagerPrivate) { - d_ptr = new QtDatePropertyManagerPrivate; d_ptr->q_ptr = this; QLocale loc; @@ -1645,7 +1636,6 @@ QtDatePropertyManager::QtDatePropertyManager(QObject *parent) QtDatePropertyManager::~QtDatePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1706,7 +1696,7 @@ QString QtDatePropertyManager::valueText(const QtProperty *property) const void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) { void (QtDatePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, const QDate &) = 0; - setValueInRange<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, const QDate>(this, d_ptr, + setValueInRange<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, const QDate>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, property, val, setSubPropertyValue); @@ -1723,7 +1713,7 @@ void QtDatePropertyManager::setValue(QtProperty *property, const QDate &val) */ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal) { - setMinimumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr, + setMinimumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1741,7 +1731,7 @@ void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal */ void QtDatePropertyManager::setMaximum(QtProperty *property, const QDate &maxVal) { - setMaximumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr, + setMaximumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1766,7 +1756,7 @@ void QtDatePropertyManager::setRange(QtProperty *property, const QDate &minVal, { void (QtDatePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, const QDate &, const QDate &, const QDate &) = 0; - setBorderValues<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate>(this, d_ptr, + setBorderValues<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate>(this, d_ptr.data(), &QtDatePropertyManager::propertyChanged, &QtDatePropertyManager::valueChanged, &QtDatePropertyManager::rangeChanged, @@ -1835,9 +1825,8 @@ public: Creates a manager with the given \a parent. */ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtTimePropertyManagerPrivate) { - d_ptr = new QtTimePropertyManagerPrivate; d_ptr->q_ptr = this; QLocale loc; @@ -1850,7 +1839,6 @@ QtTimePropertyManager::QtTimePropertyManager(QObject *parent) QtTimePropertyManager::~QtTimePropertyManager() { clear(); - delete d_ptr; } /*! @@ -1950,9 +1938,8 @@ public: Creates a manager with the given \a parent. */ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtDateTimePropertyManagerPrivate) { - d_ptr = new QtDateTimePropertyManagerPrivate; d_ptr->q_ptr = this; QLocale loc; @@ -1967,7 +1954,6 @@ QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) QtDateTimePropertyManager::~QtDateTimePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2068,9 +2054,8 @@ public: Creates a manager with the given \a parent. */ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtKeySequencePropertyManagerPrivate) { - d_ptr = new QtKeySequencePropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2080,7 +2065,6 @@ QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) QtKeySequencePropertyManager::~QtKeySequencePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2179,9 +2163,8 @@ public: Creates a manager with the given \a parent. */ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtCharPropertyManagerPrivate) { - d_ptr = new QtCharPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -2191,7 +2174,6 @@ QtCharPropertyManager::QtCharPropertyManager(QObject *parent) QtCharPropertyManager::~QtCharPropertyManager() { clear(); - delete d_ptr; } /*! @@ -2347,9 +2329,8 @@ void QtLocalePropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtLocalePropertyManagerPrivate) { - d_ptr = new QtLocalePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); @@ -2366,7 +2347,6 @@ QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) QtLocalePropertyManager::~QtLocalePropertyManager() { clear(); - delete d_ptr; } /*! @@ -2586,9 +2566,8 @@ void QtPointPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtPointPropertyManagerPrivate) { - d_ptr = new QtPointPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -2604,7 +2583,6 @@ QtPointPropertyManager::QtPointPropertyManager(QObject *parent) QtPointPropertyManager::~QtPointPropertyManager() { clear(); - delete d_ptr; } /*! @@ -2818,9 +2796,8 @@ void QtPointFPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtPointFPropertyManagerPrivate) { - d_ptr = new QtPointFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); @@ -2836,7 +2813,6 @@ QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) QtPointFPropertyManager::~QtPointFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -3131,9 +3107,8 @@ void QtSizePropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizePropertyManagerPrivate) { - d_ptr = new QtSizePropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -3149,7 +3124,6 @@ QtSizePropertyManager::QtSizePropertyManager(QObject *parent) QtSizePropertyManager::~QtSizePropertyManager() { clear(); - delete d_ptr; } /*! @@ -3226,7 +3200,7 @@ QString QtSizePropertyManager::valueText(const QtProperty *property) const */ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) { - setValueInRange<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, const QSize>(this, d_ptr, + setValueInRange<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, const QSize>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, property, val, &QtSizePropertyManagerPrivate::setValue); @@ -3243,7 +3217,7 @@ void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) */ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal) { - setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3264,7 +3238,7 @@ void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal */ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal) { - setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3290,7 +3264,7 @@ void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal */ void QtSizePropertyManager::setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal) { - setBorderValues<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize>(this, d_ptr, + setBorderValues<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize>(this, d_ptr.data(), &QtSizePropertyManager::propertyChanged, &QtSizePropertyManager::valueChanged, &QtSizePropertyManager::rangeChanged, @@ -3487,9 +3461,8 @@ void QtSizeFPropertyManagerPrivate::setRange(QtProperty *property, Creates a manager with the given \a parent. */ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizeFPropertyManagerPrivate) { - d_ptr = new QtSizeFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); @@ -3505,7 +3478,6 @@ QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) QtSizeFPropertyManager::~QtSizeFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -3593,7 +3565,7 @@ QString QtSizeFPropertyManager::valueText(const QtProperty *property) const */ void QtSizeFPropertyManager::setValue(QtProperty *property, const QSizeF &val) { - setValueInRange<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr, + setValueInRange<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, property, val, &QtSizeFPropertyManagerPrivate::setValue); @@ -3644,7 +3616,7 @@ void QtSizeFPropertyManager::setDecimals(QtProperty *property, int prec) */ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minVal) { - setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3665,7 +3637,7 @@ void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minV */ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxVal) { - setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr, + setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3691,7 +3663,7 @@ void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxV */ void QtSizeFPropertyManager::setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal) { - setBorderValues<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr, + setBorderValues<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr.data(), &QtSizeFPropertyManager::propertyChanged, &QtSizeFPropertyManager::valueChanged, &QtSizeFPropertyManager::rangeChanged, @@ -3903,9 +3875,8 @@ void QtRectPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtRectPropertyManagerPrivate) { - d_ptr = new QtRectPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -3921,7 +3892,6 @@ QtRectPropertyManager::QtRectPropertyManager(QObject *parent) QtRectPropertyManager::~QtRectPropertyManager() { clear(); - delete d_ptr; } /*! @@ -4325,9 +4295,8 @@ void QtRectFPropertyManagerPrivate::setConstraint(QtProperty *property, Creates a manager with the given \a parent. */ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtRectFPropertyManagerPrivate) { - d_ptr = new QtRectFPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); @@ -4343,7 +4312,6 @@ QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) QtRectFPropertyManager::~QtRectFPropertyManager() { clear(); - delete d_ptr; } /*! @@ -4710,9 +4678,8 @@ public: Creates a manager with the given \a parent. */ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtEnumPropertyManagerPrivate) { - d_ptr = new QtEnumPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -4722,7 +4689,6 @@ QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) QtEnumPropertyManager::~QtEnumPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5022,9 +4988,8 @@ void QtFlagPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtFlagPropertyManagerPrivate) { - d_ptr = new QtFlagPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); @@ -5040,7 +5005,6 @@ QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) QtFlagPropertyManager::~QtFlagPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5350,9 +5314,8 @@ void QtSizePolicyPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *prope Creates a manager with the given \a parent. */ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtSizePolicyPropertyManagerPrivate) { - d_ptr = new QtSizePolicyPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -5374,7 +5337,6 @@ QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) QtSizePolicyPropertyManager::~QtSizePolicyPropertyManager() { clear(); - delete d_ptr; } /*! @@ -5762,9 +5724,8 @@ void QtFontPropertyManagerPrivate::slotFontDatabaseDelayedChange() Creates a manager with the given \a parent. */ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtFontPropertyManagerPrivate) { - d_ptr = new QtFontPropertyManagerPrivate; d_ptr->q_ptr = this; QObject::connect(qApp, SIGNAL(fontDatabaseChanged()), this, SLOT(slotFontDatabaseChanged())); @@ -5792,7 +5753,6 @@ QtFontPropertyManager::QtFontPropertyManager(QObject *parent) QtFontPropertyManager::~QtFontPropertyManager() { clear(); - delete d_ptr; } /*! @@ -6140,9 +6100,8 @@ void QtColorPropertyManagerPrivate::slotPropertyDestroyed(QtProperty *property) Creates a manager with the given \a parent. */ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtColorPropertyManagerPrivate) { - d_ptr = new QtColorPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); @@ -6159,7 +6118,6 @@ QtColorPropertyManager::QtColorPropertyManager(QObject *parent) QtColorPropertyManager::~QtColorPropertyManager() { clear(); - delete d_ptr; } /*! @@ -6364,9 +6322,8 @@ public: Creates a manager with the given \a parent. */ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtCursorPropertyManagerPrivate) { - d_ptr = new QtCursorPropertyManagerPrivate; d_ptr->q_ptr = this; } @@ -6376,7 +6333,6 @@ QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) QtCursorPropertyManager::~QtCursorPropertyManager() { clear(); - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtpropertymanager.h b/tools/shared/qtpropertybrowser/qtpropertymanager.h index b3ae1c7..ccfa539 100644 --- a/tools/shared/qtpropertybrowser/qtpropertymanager.h +++ b/tools/shared/qtpropertybrowser/qtpropertymanager.h @@ -94,7 +94,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtIntPropertyManagerPrivate *d_ptr; + QScopedPointer<QtIntPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtIntPropertyManager) Q_DISABLE_COPY(QtIntPropertyManager) }; @@ -120,7 +120,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtBoolPropertyManagerPrivate *d_ptr; + QScopedPointer<QtBoolPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtBoolPropertyManager) Q_DISABLE_COPY(QtBoolPropertyManager) }; @@ -157,7 +157,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDoublePropertyManagerPrivate *d_ptr; + QScopedPointer<QtDoublePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDoublePropertyManager) Q_DISABLE_COPY(QtDoublePropertyManager) }; @@ -185,7 +185,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtStringPropertyManagerPrivate *d_ptr; + QScopedPointer<QtStringPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtStringPropertyManager) Q_DISABLE_COPY(QtStringPropertyManager) }; @@ -216,7 +216,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDatePropertyManagerPrivate *d_ptr; + QScopedPointer<QtDatePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDatePropertyManager) Q_DISABLE_COPY(QtDatePropertyManager) }; @@ -241,7 +241,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtTimePropertyManagerPrivate *d_ptr; + QScopedPointer<QtTimePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtTimePropertyManager) Q_DISABLE_COPY(QtTimePropertyManager) }; @@ -266,7 +266,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtDateTimePropertyManagerPrivate *d_ptr; + QScopedPointer<QtDateTimePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtDateTimePropertyManager) Q_DISABLE_COPY(QtDateTimePropertyManager) }; @@ -291,7 +291,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtKeySequencePropertyManagerPrivate *d_ptr; + QScopedPointer<QtKeySequencePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtKeySequencePropertyManager) Q_DISABLE_COPY(QtKeySequencePropertyManager) }; @@ -316,7 +316,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtCharPropertyManagerPrivate *d_ptr; + QScopedPointer<QtCharPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCharPropertyManager) Q_DISABLE_COPY(QtCharPropertyManager) }; @@ -344,7 +344,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtLocalePropertyManagerPrivate *d_ptr; + QScopedPointer<QtLocalePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtLocalePropertyManager) Q_DISABLE_COPY(QtLocalePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotEnumChanged(QtProperty *, int)) @@ -373,7 +373,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtPointPropertyManagerPrivate *d_ptr; + QScopedPointer<QtPointPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtPointPropertyManager) Q_DISABLE_COPY(QtPointPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -405,7 +405,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtPointFPropertyManagerPrivate *d_ptr; + QScopedPointer<QtPointFPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtPointFPropertyManager) Q_DISABLE_COPY(QtPointFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -440,7 +440,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizePropertyManagerPrivate *d_ptr; + QScopedPointer<QtSizePropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSizePropertyManager) Q_DISABLE_COPY(QtSizePropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -478,7 +478,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizeFPropertyManagerPrivate *d_ptr; + QScopedPointer<QtSizeFPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSizeFPropertyManager) Q_DISABLE_COPY(QtSizeFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -510,7 +510,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtRectPropertyManagerPrivate *d_ptr; + QScopedPointer<QtRectPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtRectPropertyManager) Q_DISABLE_COPY(QtRectPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -545,7 +545,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtRectFPropertyManagerPrivate *d_ptr; + QScopedPointer<QtRectFPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtRectFPropertyManager) Q_DISABLE_COPY(QtRectFPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotDoubleChanged(QtProperty *, double)) @@ -579,7 +579,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtEnumPropertyManagerPrivate *d_ptr; + QScopedPointer<QtEnumPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtEnumPropertyManager) Q_DISABLE_COPY(QtEnumPropertyManager) }; @@ -609,7 +609,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtFlagPropertyManagerPrivate *d_ptr; + QScopedPointer<QtFlagPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtFlagPropertyManager) Q_DISABLE_COPY(QtFlagPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotBoolChanged(QtProperty *, bool)) @@ -639,7 +639,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtSizePolicyPropertyManagerPrivate *d_ptr; + QScopedPointer<QtSizePolicyPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager) Q_DISABLE_COPY(QtSizePolicyPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -672,7 +672,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtFontPropertyManagerPrivate *d_ptr; + QScopedPointer<QtFontPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtFontPropertyManager) Q_DISABLE_COPY(QtFontPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -706,7 +706,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtColorPropertyManagerPrivate *d_ptr; + QScopedPointer<QtColorPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtColorPropertyManager) Q_DISABLE_COPY(QtColorPropertyManager) Q_PRIVATE_SLOT(d_func(), void slotIntChanged(QtProperty *, int)) @@ -736,7 +736,7 @@ protected: virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: - QtCursorPropertyManagerPrivate *d_ptr; + QScopedPointer<QtCursorPropertyManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtCursorPropertyManager) Q_DISABLE_COPY(QtCursorPropertyManager) }; diff --git a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp index 81164fd..d38d772 100644 --- a/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp +++ b/tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp @@ -726,9 +726,8 @@ void QtTreePropertyBrowserPrivate::editItem(QtBrowserItem *browserItem) Creates a property browser with the given \a parent. */ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) - : QtAbstractPropertyBrowser(parent) + : QtAbstractPropertyBrowser(parent), d_ptr(new QtTreePropertyBrowserPrivate) { - d_ptr = new QtTreePropertyBrowserPrivate; d_ptr->q_ptr = this; d_ptr->init(this); @@ -747,7 +746,6 @@ QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) */ QtTreePropertyBrowser::~QtTreePropertyBrowser() { - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qttreepropertybrowser.h b/tools/shared/qtpropertybrowser/qttreepropertybrowser.h index 988eda1..245c97f 100644 --- a/tools/shared/qtpropertybrowser/qttreepropertybrowser.h +++ b/tools/shared/qtpropertybrowser/qttreepropertybrowser.h @@ -118,7 +118,7 @@ protected: private: - QtTreePropertyBrowserPrivate *d_ptr; + QScopedPointer<QtTreePropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtTreePropertyBrowser) Q_DISABLE_COPY(QtTreePropertyBrowser) diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp index 18a9c81..3d80c18 100644 --- a/tools/shared/qtpropertybrowser/qtvariantproperty.cpp +++ b/tools/shared/qtpropertybrowser/qtvariantproperty.cpp @@ -188,9 +188,8 @@ public: \sa QtVariantPropertyManager */ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) - : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) + : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) { - } /*! @@ -200,7 +199,6 @@ QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) */ QtVariantProperty::~QtVariantProperty() { - delete d_ptr; } /*! @@ -912,9 +910,8 @@ void QtVariantPropertyManagerPrivate::slotFlagNamesChanged(QtProperty *property, Creates a manager with the given \a parent. */ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) - : QtAbstractPropertyManager(parent) + : QtAbstractPropertyManager(parent), d_ptr(new QtVariantPropertyManagerPrivate) { - d_ptr = new QtVariantPropertyManagerPrivate; d_ptr->q_ptr = this; d_ptr->m_creatingProperty = false; @@ -1234,7 +1231,6 @@ QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) QtVariantPropertyManager::~QtVariantPropertyManager() { clear(); - delete d_ptr; } /*! @@ -1929,9 +1925,8 @@ public: Creates a factory with the given \a parent. */ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) - : QtAbstractEditorFactory<QtVariantPropertyManager>(parent) + : QtAbstractEditorFactory<QtVariantPropertyManager>(parent), d_ptr(new QtVariantEditorFactoryPrivate()) { - d_ptr = new QtVariantEditorFactoryPrivate(); d_ptr->q_ptr = this; d_ptr->m_spinBoxFactory = new QtSpinBoxFactory(this); @@ -1993,7 +1988,6 @@ QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) */ QtVariantEditorFactory::~QtVariantEditorFactory() { - delete d_ptr; } /*! diff --git a/tools/shared/qtpropertybrowser/qtvariantproperty.h b/tools/shared/qtpropertybrowser/qtvariantproperty.h index bbc07b0..c7a65f1 100644 --- a/tools/shared/qtpropertybrowser/qtvariantproperty.h +++ b/tools/shared/qtpropertybrowser/qtvariantproperty.h @@ -67,7 +67,7 @@ protected: QtVariantProperty(QtVariantPropertyManager *manager); private: friend class QtVariantPropertyManager; - class QtVariantPropertyPrivate *d_ptr; + QScopedPointer<class QtVariantPropertyPrivate> d_ptr; }; class QtVariantPropertyManager : public QtAbstractPropertyManager @@ -111,7 +111,7 @@ protected: virtual void uninitializeProperty(QtProperty *property); virtual QtProperty *createProperty(); private: - class QtVariantPropertyManagerPrivate *d_ptr; + QScopedPointer<class QtVariantPropertyManagerPrivate> d_ptr; Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, int)) Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int)) Q_PRIVATE_SLOT(d_func(), void slotSingleStepChanged(QtProperty *, int)) @@ -165,7 +165,7 @@ protected: QWidget *parent); void disconnectPropertyManager(QtVariantPropertyManager *manager); private: - class QtVariantEditorFactoryPrivate *d_ptr; + QScopedPointer<class QtVariantEditorFactoryPrivate> d_ptr; Q_DECLARE_PRIVATE(QtVariantEditorFactory) Q_DISABLE_COPY(QtVariantEditorFactory) }; diff --git a/tools/shared/qttoolbardialog/qttoolbardialog.cpp b/tools/shared/qttoolbardialog/qttoolbardialog.cpp index bc5e42d..770f537 100644 --- a/tools/shared/qttoolbardialog/qttoolbardialog.cpp +++ b/tools/shared/qttoolbardialog/qttoolbardialog.cpp @@ -119,7 +119,7 @@ signals: void toolBarChanged(QToolBar *toolBar, const QList<QAction *> &actions); private: - QtFullToolBarManagerPrivate *d_ptr; + QScopedPointer<QtFullToolBarManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtFullToolBarManager) Q_DISABLE_COPY(QtFullToolBarManager) }; @@ -443,15 +443,13 @@ QToolBar *QtFullToolBarManagerPrivate::toolBarByName(const QString &toolBarName) ////////////////////////////// QtFullToolBarManager::QtFullToolBarManager(QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new QtFullToolBarManagerPrivate) { - d_ptr = new QtFullToolBarManagerPrivate; d_ptr->q_ptr = this; } QtFullToolBarManager::~QtFullToolBarManager() { - delete d_ptr; } void QtFullToolBarManager::setMainWindow(QMainWindow *mainWindow) @@ -831,9 +829,8 @@ public: Creates a toolbar manager with the given \a parent. */ QtToolBarManager::QtToolBarManager(QObject *parent) - : QObject(parent) + : QObject(parent), d_ptr(new QtToolBarManagerPrivate) { - d_ptr = new QtToolBarManagerPrivate; d_ptr->q_ptr = this; d_ptr->manager = new QtFullToolBarManager(this); @@ -844,7 +841,6 @@ QtToolBarManager::QtToolBarManager(QObject *parent) */ QtToolBarManager::~QtToolBarManager() { - delete d_ptr; } /*! @@ -1781,9 +1777,8 @@ void QtToolBarListWidget::dropEvent(QDropEvent *event) window \a flags. */ QtToolBarDialog::QtToolBarDialog(QWidget *parent, Qt::WindowFlags flags) - : QDialog(parent, flags) + : QDialog(parent, flags), d_ptr(new QtToolBarDialogPrivate) { - d_ptr = new QtToolBarDialogPrivate; d_ptr->q_ptr = this; d_ptr->ui.setupUi(this); d_ptr->separatorText = tr("< S E P A R A T O R >"); @@ -1834,7 +1829,6 @@ QtToolBarDialog::QtToolBarDialog(QWidget *parent, Qt::WindowFlags flags) QtToolBarDialog::~QtToolBarDialog() { d_ptr->clearOld(); - delete d_ptr; } /*! diff --git a/tools/shared/qttoolbardialog/qttoolbardialog.h b/tools/shared/qttoolbardialog/qttoolbardialog.h index 62b0ff3..f813b13 100644 --- a/tools/shared/qttoolbardialog/qttoolbardialog.h +++ b/tools/shared/qttoolbardialog/qttoolbardialog.h @@ -88,7 +88,7 @@ public: private: friend class QtToolBarDialog; - QtToolBarManagerPrivate *d_ptr; + QScopedPointer<QtToolBarManagerPrivate> d_ptr; Q_DECLARE_PRIVATE(QtToolBarManager) Q_DISABLE_COPY(QtToolBarManager) }; @@ -112,7 +112,7 @@ protected: private: - QtToolBarDialogPrivate *d_ptr; + QScopedPointer<QtToolBarDialogPrivate> d_ptr; Q_DECLARE_PRIVATE(QtToolBarDialog) Q_DISABLE_COPY(QtToolBarDialog) diff --git a/tools/tools.pro b/tools/tools.pro index eab9d48..a602892 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -13,6 +13,7 @@ no-png { SUBDIRS += designer } SUBDIRS += linguist + symbian: SUBDIRS = designer wince*: SUBDIRS = qtestlib designer unix:!mac:!embedded:contains(QT_CONFIG, qt3support):SUBDIRS += qtconfig win32:!wince*:SUBDIRS += activeqt |