summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configure.pro5
-rw-r--r--tools/configure/configureapp.cpp206
-rw-r--r--tools/designer/src/components/formeditor/brushmanagerproxy.cpp4
-rw-r--r--tools/designer/src/components/formeditor/brushmanagerproxy.h2
-rw-r--r--tools/designer/src/components/formeditor/qtbrushmanager.cpp5
-rw-r--r--tools/designer/src/components/formeditor/qtbrushmanager.h2
-rw-r--r--tools/designer/src/lib/shared/iconselector.cpp5
-rw-r--r--tools/designer/src/lib/shared/iconselector_p.h4
-rw-r--r--tools/designer/src/lib/shared/qtresourceeditordialog.cpp5
-rw-r--r--tools/designer/src/lib/shared/qtresourceeditordialog_p.h3
-rw-r--r--tools/designer/src/lib/shared/qtresourcemodel.cpp2
-rw-r--r--tools/designer/src/lib/shared/qtresourcemodel_p.h5
-rw-r--r--tools/designer/src/lib/shared/qtresourceview.cpp4
-rw-r--r--tools/designer/src/lib/shared/qtresourceview_p.h4
-rw-r--r--tools/designer/src/lib/uilib/abstractformbuilder.cpp189
-rw-r--r--tools/designer/src/uitools/quiloader.cpp1
-rw-r--r--tools/designer/src/uitools/quiloader.h3
-rw-r--r--tools/shared/qtgradienteditor/qtcolorbutton.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtcolorbutton.h2
-rw-r--r--tools/shared/qtgradienteditor/qtcolorline.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtcolorline.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientdialog.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientdialog.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradienteditor.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopscontroller.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopscontroller.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopsmodel.cpp7
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopsmodel.h4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopswidget.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientstopswidget.h2
-rw-r--r--tools/shared/qtgradienteditor/qtgradientwidget.cpp4
-rw-r--r--tools/shared/qtgradienteditor/qtgradientwidget.h2
-rw-r--r--tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h2
-rw-r--r--tools/shared/qtpropertybrowser/qteditorfactory.cpp54
-rw-r--r--tools/shared/qtpropertybrowser/qteditorfactory.h30
-rw-r--r--tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h2
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.cpp14
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowser.h8
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.cpp128
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertymanager.h44
-rw-r--r--tools/shared/qtpropertybrowser/qttreepropertybrowser.cpp4
-rw-r--r--tools/shared/qtpropertybrowser/qttreepropertybrowser.h2
-rw-r--r--tools/shared/qtpropertybrowser/qtvariantproperty.cpp12
-rw-r--r--tools/shared/qtpropertybrowser/qtvariantproperty.h6
-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.cpp14
-rw-r--r--tools/shared/qttoolbardialog/qttoolbardialog.h4
49 files changed, 516 insertions, 318 deletions
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 1ce9a1b..b82104e 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -6,7 +6,10 @@ CONFIG -= moc qt
DEFINES = QT_NODLL QT_NO_CODECS QT_NO_TEXTCODEC QT_NO_UNICODETABLES QT_LITE_COMPONENT QT_NO_STL QT_NO_COMPRESS QT_BUILD_QMAKE QT_NO_THREAD QT_NO_QOBJECT _CRT_SECURE_NO_DEPRECATE
-win32 : LIBS += -lole32 -ladvapi32
+win32 : !win32-mwc : LIBS += -lole32 -ladvapi32
+win32-mwc {
+ LIBS += -ladvapi32.lib -luuid.lib
+}
win32-msvc.net | win32-msvc2* : QMAKE_CXXFLAGS += /EHsc
win32-g++ : LIBS += -luuid
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index e8fb282..7cdb063 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -310,6 +310,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "LIBJPEG" ] = "auto";
dictionary[ "LIBPNG" ] = "auto";
dictionary[ "LIBMNG" ] = "auto";
+ dictionary[ "FREETYPE" ] = "no";
dictionary[ "QT3SUPPORT" ] = "yes";
dictionary[ "ACCESSIBILITY" ] = "yes";
@@ -327,6 +328,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";
@@ -586,6 +588,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;
@@ -665,6 +674,11 @@ 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";
@@ -775,6 +789,13 @@ 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);
+ }
else if (configCmdLine.at(i) == "-fast" )
dictionary[ "FAST" ] = "yes";
else if (configCmdLine.at(i) == "-no-fast" )
@@ -1097,12 +1118,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)) {
@@ -1156,9 +1194,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";
@@ -1172,9 +1210,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;
}
@@ -1183,7 +1236,7 @@ void Configure::validateArgs()
cout << "No such configuration \"" << qPrintable(dictionary[ "QCONFIG" ]) << "\"" << endl ;
}
else
- qmakeConfig += configs;
+ qmakeConfig += (*config) + "-config";
}
#endif
@@ -1304,6 +1357,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";
@@ -1330,6 +1385,48 @@ 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";
+ // 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";
@@ -1602,6 +1699,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", ' ');
@@ -1616,7 +1714,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
@@ -1645,6 +1744,11 @@ 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 S60 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.\n");
+ desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2\n");
return true;
}
return false;
@@ -1778,12 +1882,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")
@@ -1968,6 +2081,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;
}
@@ -2117,6 +2239,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";
@@ -2148,6 +2274,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";
@@ -2298,6 +2427,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
@@ -2338,8 +2470,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())
@@ -2498,7 +2634,12 @@ void Configure::generateCachefile()
configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl;
if(!dictionary["QMAKE_RPATHDIR"].isEmpty())
- configStream<<"QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"];
+ configStream<<"QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"] <<endl;
+
+ if(!dictionary["ARM_FPU_TYPE"].isEmpty())
+ {
+ configStream<<"QMAKE_CXXFLAGS.ARMCC += --fpu "<< dictionary["ARM_FPU_TYPE"];
+ }
configStream.flush();
configFile.close();
@@ -2539,6 +2680,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");
@@ -2608,6 +2761,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";
@@ -2622,7 +2776,6 @@ 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";
@@ -2655,6 +2808,10 @@ void Configure::generateConfigfiles()
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)
@@ -2901,7 +3058,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;
@@ -2912,7 +3070,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;
@@ -3086,8 +3245,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";
@@ -3307,9 +3468,8 @@ void Configure::generateMakefiles()
void Configure::showSummary()
{
- QString make = dictionary[ "MAKE" ];
- 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;
+ cout << endl << endl << "Qt is now configured for building. Just run '" << qPrintable(dictionary["QTBUILDINSTRUCTION"]) << "'." << endl
+ << "To reconfigure, run '" << qPrintable(dictionary["CONFCLEANINSTRUCTION"]) << "' and configure." << endl;
}
Configure::ProjectType Configure::projectType( const QString& proFileName )
@@ -3425,9 +3585,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 543e8c9..bb89cf6 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 03bf56b..bfd95e5 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 5a5ab8b..20de1df 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 1f3dc5b..4884c577 100644
--- a/tools/designer/src/components/formeditor/qtbrushmanager.h
+++ b/tools/designer/src/components/formeditor/qtbrushmanager.h
@@ -77,7 +77,7 @@ signals:
void currentBrushChanged(const QString &name, const QBrush &brush);
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 a6b37ed..b7ab216 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 9b650cd..9190d54 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 4b21eb3..0a0e3d7 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 157d181..6eac2b8 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 45e6c27..b4895d6 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 236e35a..e9f1c93 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 40be3e6..2fc43cd 100644
--- a/tools/designer/src/lib/shared/qtresourceview.cpp
+++ b/tools/designer/src/lib/shared/qtresourceview.cpp
@@ -636,8 +636,6 @@ QtResourceView::~QtResourceView()
{
if (!d_ptr->m_settingsKey.isEmpty())
d_ptr->saveSettings();
-
- delete d_ptr;
}
bool QtResourceView::event(QEvent *event)
@@ -874,8 +872,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 fb8fb83..0484686 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 65ea375..5a6e1f5 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/uitools/quiloader.cpp b/tools/designer/src/uitools/quiloader.cpp
index 5387c2d..83d3089 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 dd3d32a..40b5010 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 30a9c66..d7aaa2e 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 6cae0a9..0348998 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 066596c..8517933 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 bfbec9e..ffd3eea 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 6c2deff..066bc35 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 f97e75f..f293a28 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 76562c4..5c95d1b 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 9e8518f..2d96515 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 4e6639a..9813705 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 ce831d8..7c6a660 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 4611378..52bd367 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 a1d593a..a02ebc5 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 6eb4d45..2d75832 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 20ed9e3..753d695 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 ae94a65..73c0547 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 318c03a..3e23bf9 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 570b29a..24bf75a 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 4db0318..a558657 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 60b9f04..7729a73 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 ec51d00..bad2080 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 ee82065..31a2135 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 2d8ae91..1cfda63 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 e20fca4..ebe9417 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 55b0da0..19996c0 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 50f3306..43bd68a 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 5e60de0..31c308e 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 950272c..51416a8 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 c83d36c..ebcf185 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 cdb0c29..b80d21d 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 bfc9c44..4f32c57 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 c313709..8ceb582 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 db4f70d..9227b56 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)