diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-10 13:40:34 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-10 13:40:34 (GMT) |
commit | 2c4bbeecd084bf4565643d4cd42de3be1aed5681 (patch) | |
tree | dc40f7bba6c74248c9a0359b05b39bce0e6decb2 /src/tools | |
parent | d1c5585faa066a6693c24600cf8a1c42a285fe3b (diff) | |
parent | 7b15c669c336a1d76e3ac001fadde38a294e3e80 (diff) | |
download | Qt-2c4bbeecd084bf4565643d4cd42de3be1aed5681.zip Qt-2c4bbeecd084bf4565643d4cd42de3be1aed5681.tar.gz Qt-2c4bbeecd084bf4565643d4cd42de3be1aed5681.tar.bz2 |
Merge remote branch 'mainline/4.6' into 4.6
Conflicts:
tools/configure/configureapp.cpp
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/tools.pro | 72 | ||||
-rw-r--r-- | src/tools/uic3/embed.cpp | 4 |
2 files changed, 74 insertions, 2 deletions
diff --git a/src/tools/tools.pro b/src/tools/tools.pro new file mode 100644 index 0000000..25527e3 --- /dev/null +++ b/src/tools/tools.pro @@ -0,0 +1,72 @@ +TEMPLATE = subdirs + +TOOLS_SUBDIRS = src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic +!cross_compile { + contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_tools_uic3 + win32:!wince*: SRC_SUBDIRS += src_tools_idc +} + +# Set subdir and respective target name +src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap +src_tools_bootstrap.target = sub-tools-bootstrap +src_tools_moc.subdir = $$QT_SOURCE_TREE/src/tools/moc +src_tools_moc.target = sub-moc +src_tools_rcc.subdir = $$QT_SOURCE_TREE/src/tools/rcc +src_tools_rcc.target = sub-rcc +src_tools_uic.subdir = $$QT_SOURCE_TREE/src/tools/uic +src_tools_uic.target = sub-uic +src_tools_uic3.subdir = $$QT_SOURCE_TREE/src/tools/uic3 +src_tools_uic3.target = sub-uic3 +src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc +src_tools_idc.target = sub-idc + +!wince*:!symbian:!ordered { + # Set dependencies for each subdir + src_tools_moc.depends = src_tools_bootstrap + src_tools_rcc.depends = src_tools_bootstrap + src_tools_uic.depends = src_tools_bootstrap +} + +# Special handling, depending on type of project, if it used debug/release or only has one configuration +EXTRA_DEBUG_TARGETS = +EXTRA_RELEASE_TARGETS = +!symbian { + for(subname, TOOLS_SUBDIRS) { + subdir = $$subname + !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir) + subpro = $$subdir/$${basename(subdir)}.pro + !exists($$subpro):next() + subtarget = $$replace(subdir, [^A-Za-z0-9], _) + reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\) + subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE) + subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP) + subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP) + SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) + !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info { + #debug + eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) + eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)) + EXTRA_DEBUG_TARGETS += debug-$${subtarget} + QMAKE_EXTRA_TARGETS += debug-$${subtarget} + #release + eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) + eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)) + EXTRA_RELEASE_TARGETS += release-$${subtarget} + QMAKE_EXTRA_TARGETS += release-$${subtarget} + } else { #do not have a real debug target/release + #debug + eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) + eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) + EXTRA_DEBUG_TARGETS += debug-$${subtarget} + QMAKE_EXTRA_TARGETS += debug-$${subtarget} + #release + eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) + eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) + EXTRA_RELEASE_TARGETS += release-$${subtarget} + QMAKE_EXTRA_TARGETS += release-$${subtarget} + } + } +} + +SUBDIRS = $$TOOLS_SUBDIRS $$SUBDIRS +isEqual(TARGET,tools): SUBDIRS += $$SRC_SUBDIRS diff --git a/src/tools/uic3/embed.cpp b/src/tools/uic3/embed.cpp index d699623..2eb4dd5 100644 --- a/src/tools/uic3/embed.cpp +++ b/src/tools/uic3/embed.cpp @@ -177,7 +177,7 @@ void Ui3Reader::embed(const char *project, const QStringList &images) e->width = img.width(); e->height = img.height(); e->depth = img.depth(); - e->numColors = img.numColors(); + e->numColors = img.colorCount(); e->colorTable = new QRgb[e->numColors]; e->alpha = img.hasAlphaBuffer(); QVector<QRgb> ct = img.colorTable(); @@ -195,7 +195,7 @@ void Ui3Reader::embed(const char *project, const QStringList &images) #ifndef QT_NO_IMAGE_COLLECTION_COMPRESSION e->compressed = #endif - embedData( out, img.bits(), img.numBytes() ); + embedData( out, img.bits(), img.byteCount() ); out << "\n};\n\n"; if ( e->numColors ) { out << s.sprintf( "static const QRgb %s_ctable[] = {", |