Revert a part of change 1a7b140eb8,
which removed the assignment to a different variable.
Task-number: QTBUG-54000
Change-Id: Ic15411259445afa50770487a37f8762fe57975e9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The enumeration values are mostly used as flags with some unnecessary
casts. Clean this up by introducing flags.
Change-Id: Iab03acb9ab83624bd0e3a6812255d7215d502003
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
- Avoid conversion from QString to QByteArray.
- Replace a = a.mid() by a.remove().
- Replace a = a.left() by a.truncate().
- Streamline code extracting an error code.
Change-Id: I43c1f04e947632f725bbb86af5abf108b2b02261
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
From Qt 5.7 -> tools & applications are licensed under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I28b956229a96fd982b22640226a716c1a4f3aa0d
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
vtable-stubs inherit QAxObject and can thus not be copied. When
using qRegisterMetaType<> on them, cryptic error messages are
generated:
src/activeqt/container/qaxobject.h(58) : error C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'
src/corelib/kernel/qobject.h(275) : see declaration of 'QObject::QObject'
include\qtcore\../../src/corelib/kernel/qobject.h(96) : see declaration of 'QObject'
To fix this, extract a list of the stubs at the beginning and suppress
the generation of qRegisterMetaType<> for them.
When writing out the class declaration, explicitly disable copy
for them to make error messages clearer.
Task-number: QTBUG-27792
Change-Id: Ia538a68864f3621234c1aab366b097ded881e859
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
produces:
/****************************************************************************
**
** Namespace TestLib generated by dumpcpp v5.5.0 using
** dumpcpp -o test Test.tlb
** from the type library Test.tlb
**
****************************************************************************/
Task-number: QTBUG-27792
Change-Id: I22ef45c424f07ae89e2cbae1d8c05686b0646c5c
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
QMetaMethod::methodSignature() produces for an invokable slot with
array type parameters (void foo(const char p1[10],int p2)):
foo(const char[10],int)
Split off the array specification and append it to the parameter name.
Task-number: QTBUG-46177
Change-Id: I58670570357472f6f5b7fcf0e841d3b7cb4189c8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This option was used as a hack for qmake.
We know better hacks these days.
Change-Id: I9fb6b40f7d2ddd40cd51ae758c86fd6d3b060035
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I2febb46d711c51eeb08f13418a4fc15ab0502f1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Fix errors occurring for forward-declared types in the generated
header like:
qmetatype.h(1354) : error C2027: use of undefined type 'stdole::Font'
vcgantt.h(26) : see declaration of 'stdole::Font'
qmetatype.h(1539) : see reference to class template instantiation 'QtPrivate::IsPointerToTypeDerivedFromQObject<T>' being compiled
with
[
T=stdole::Font *
]
qmetatype.h(1546) : see reference to class template instantiation 'QMetaTypeId<T>' being compiled
with
[
T=stdole::Font *
]
\vcgantt.h(33401) : see reference to class template instantiation 'QMetaTypeId2<T>' being compiled
with
[
T=stdole::Font *
]
qmetatype.h(1354) : error C2338: Type argument of Q_DECLARE_METATYPE(T*) must be fully defined
Task-number: QTBUG-26587
Change-Id: I9e6c87551b462bc27f94d8e8bd36497075dac8d3
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Change the type from QByteArray to QString, removing some
conversion code. Move nameSpace option parameter into main
and turn into a QString as well.
Task-number: QTBUG-41130
Change-Id: Ife42f099f725a83e91cc2b73b49cee3fa8c3898b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
QString::truncate(), QString::remove() or
QString::chop() should be used when assigning to self.
Change-Id: Ic0582ad3bc9389cbd315dee885921628197747f2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Change-Id: I4321103f75a13688de3400a1a238ac5414a0efd8
QByteArray::toLower() returns a lowercase copy of the byte array.
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Pointer to a pointer (**) type parameters didn't get namespace
prepended to them.
Task-number: QTBUG-28383
Change-Id: I9379fecfad5814b897af7757d0b7b650b31d01e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Instead of writing vast amounts of data into a QByteArray, we're using
a temporary file as clipboard. This enables us to handle much larger
import tables without worrying about running out of RAM.
Task-number: QTBUG-28325
Change-Id: Ied9567651cd859400ba3ed9a45cbbaac603300b6
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
All qax_* functions that return QMetaObject instances actually return
instances of QAxMetaObject. To make sure that ~QAxMetaObject is
called, we introduce the qax_deleteMetaObject function and call it in
the appropriate places.
The explicit call to QByteArray::detach is needed because the
affected QMetaObject/Method calls return a QByteArray that directly
holds a pointer to the QByteArrayData contained in QAxMetaObject.
Once the QAxMetaObject is destroyed, the QByteArray objects will hold
pointers to freed memory. Therefore we make a deep copy of the
QByteArray by detaching it.
Task-number: QTBUG-28325
Change-Id: I97613f12f1a30608dd5acd67d0faebb3f39cdf70
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
The formerly monolithic ActiveQt module has been split into three
modules:
axserver
A static library for creating a server project.
axcontainer
A static libary for creating a container project.
axbase
A static library with shared code for the latter two libraries.
This module also is responsible for the installation of header
files in the include/ActiveQt directory.
"CONFIG += qaxserver" has been deprecated.
Use "QT += axserver" instead.
"CONFIG += qaxcontainer" has been deprecated.
Use "QT += axcontainer" instead.
Code from qaxtypes.cpp that does not depend on the QAX_SERVER define
has been moved to qaxtypefunctions.cpp and resides in the axbase
module.
Task-number: QTBUG-27776
Change-Id: Ib39fc897ccfce16849be0e3c084817d2cd0fc926
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
QMetaType private API was changed therefore the dumper tool has to be
upgraded.
Change-Id: Ibf200b71a7b12a4c011dd9ce426439ad1eec62dc
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Change copyrights and license headers from Nokia to Digia
Change-Id: I4060147644d7ca34ccff71b3deb30e242b611dab
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Dumpcpp tool still generated revision 1 moc format, so generated code
would no longer compile. Ported relevant revision 7 generation code
from moc tool to dumpcpp tool. Also squashed multiple generated string
tables into a single string table.
QVariant::nameToType(typeName) no longer returns UserType for QVariant,
so fixed few comparisons to take this into account.
Removed warning print from MetaObjectGenerator::addProperty(), as
this just spams warnings unnecessarily when generating properties.
Normally the required metatypes are not registered at time of
generation (e.g. when running dumpcpp tool). Note that the check for
this warning was buggy in Qt4, so it already never printed there.
Added a simple autotest to verify dumpcpp generates working code.
Task-number: QTBUG-26587
Change-Id: If12d2301890c209e7fbcb3bc054791a1c9d492c3
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Changes in QMetaMethod::typeName() return value caused functions
that return void to incorrectly generate return statments in dumpcpp.
Task-number: QTBUG-26587
Change-Id: Id0abea96234a0a75cab8b53473cfee7e60846499
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
QMetaMethod::signature() has been renamed to methodSignature(),
and it now returns a QByteArray.
The (internal) QMetaObject::d::stringdata member is now of type
const QByteArrayData *. Use reinterpret_cast to keep it compiling
until ActiveQt's meta-object generator has been ported to the new
meta-object format (revision 7).
Change-Id: Iba6e867f719eae9f72b78d3cd206f27ae13d1328
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
qMetaTypeConstructHelper(const T*) is a private api which was changed to
qMetaTypeCreateHelper(const void*).
Change-Id: I81e434cef9b1f15eadcb6e2f2d28eb979274ed64
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.
Change-Id: I82638e41d9adc9180fef26a5548f775399afafb2
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Comment out Some functionality for the moment.
Change-Id: Ia7d1d3ba982e97776ae7259be06689b5477450a1
Reviewed-on: http://codereview.qt-project.org/5972
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://qt.gitorious.org/qt/pages/GitIntroductionWithQt
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12