Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I34b5e290233d0869fbafac094a939aec2bf83fd5
This commit is contained in:
commit
6feec9da93
4
src/3rdparty/atspi2/xml/Cache.xml
vendored
4
src/3rdparty/atspi2/xml/Cache.xml
vendored
@ -9,12 +9,12 @@
|
||||
|
||||
<signal name="AddAccessible">
|
||||
<arg name="nodeAdded" type="((so)(so)a(so)assusau)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiAccessibleCacheItem"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAccessibleCacheItem"/>
|
||||
</signal>
|
||||
|
||||
<signal name="RemoveAccessible">
|
||||
<arg name="nodeRemoved" type="(so)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
|
@ -3458,7 +3458,7 @@ Q_GLOBAL_STATIC(AndroidRandomStorage, randomTLS)
|
||||
pseudo random integers to be returned by qrand().
|
||||
|
||||
The sequence of random numbers generated is deterministic per thread. For example,
|
||||
if two threads call qsrand(1) and subsequently calls qrand(), the threads will get
|
||||
if two threads call qsrand(1) and subsequently call qrand(), the threads will get
|
||||
the same random number sequence.
|
||||
|
||||
\sa qrand()
|
||||
|
@ -1756,17 +1756,6 @@
|
||||
\value Key_Zoom
|
||||
\value Key_Exit
|
||||
\value Key_Cancel
|
||||
\value Key_MicVolumeUp
|
||||
\value Key_Find
|
||||
\value Key_Open
|
||||
\value Key_MicVolumeDown
|
||||
\value Key_New
|
||||
\value Key_Settings
|
||||
\value Key_Redo
|
||||
\value Key_Exit
|
||||
\value Key_Info
|
||||
\value Key_Undo
|
||||
\value Key_Guide
|
||||
|
||||
\sa QKeyEvent::key()
|
||||
*/
|
||||
@ -2299,7 +2288,7 @@
|
||||
\enum Qt::ItemSelectionMode
|
||||
|
||||
This enum is used in QGraphicsItem, QGraphicsScene and QGraphicsView to
|
||||
specify how items are selected, or how to determine if a shapes and items
|
||||
specify how items are selected, or how to determine if shapes and items
|
||||
collide.
|
||||
|
||||
\value ContainsItemShape The output list contains only items whose
|
||||
|
@ -180,7 +180,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
|
||||
t.start();
|
||||
switch (awaitStyle) {
|
||||
case ProcessMainThreadEvents:
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
|
||||
QCoreApplication::processEvents();
|
||||
if (timeout && t.hasExpired(timeout))
|
||||
return ERROR_TIMEOUT;
|
||||
@ -188,7 +188,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
|
||||
break;
|
||||
case ProcessThreadEvents:
|
||||
if (QAbstractEventDispatcher *dispatcher = QThread::currentThread()->eventDispatcher()) {
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
|
||||
dispatcher->processEvents(QEventLoop::AllEvents);
|
||||
if (timeout && t.hasExpired(timeout))
|
||||
return ERROR_TIMEOUT;
|
||||
@ -198,7 +198,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
|
||||
// fall through
|
||||
default:
|
||||
case YieldThread:
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
|
||||
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
|
||||
QThread::yieldCurrentThread();
|
||||
if (timeout && t.hasExpired(timeout))
|
||||
return ERROR_TIMEOUT;
|
||||
@ -206,7 +206,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
|
||||
break;
|
||||
}
|
||||
|
||||
if (FAILED(hr) || status != Completed) {
|
||||
if (FAILED(hr) || status != AsyncStatus::Completed) {
|
||||
HRESULT ec;
|
||||
hr = asyncInfo->get_ErrorCode(&ec);
|
||||
if (FAILED(hr))
|
||||
|
@ -370,7 +370,7 @@ void **QListData::erase(void **xi)
|
||||
application must interface with a C API.
|
||||
|
||||
\note Iterators into a QLinkedList and references into
|
||||
heap-allocating QLists remain valid long as the referenced items
|
||||
heap-allocating QLists remain valid as long as the referenced items
|
||||
remain in the container. This is not true for iterators and
|
||||
references into a QVector and non-heap-allocating QLists.
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
application must interface with a C API.
|
||||
|
||||
\note Iterators into a QLinkedList and references into
|
||||
heap-allocating QLists remain valid long as the referenced items
|
||||
heap-allocating QLists remain valid as long as the referenced items
|
||||
remain in the container. This is not true for iterators and
|
||||
references into a QVector and non-heap-allocating QLists.
|
||||
|
||||
|
@ -348,7 +348,7 @@ static inline void qt_mac_waitForMoreEvents(NSString *runLoopMode = NSDefaultRun
|
||||
bool QCocoaEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags)
|
||||
{
|
||||
Q_D(QCocoaEventDispatcher);
|
||||
d->interrupt = false;
|
||||
QBoolBlocker interruptBlocker(d->interrupt, false);
|
||||
|
||||
bool interruptLater = false;
|
||||
QtCocoaInterruptDispatcher::cancelInterruptLater();
|
||||
|
@ -275,8 +275,6 @@ QXcbClipboard::QXcbClipboard(QXcbConnection *c)
|
||||
{
|
||||
Q_ASSERT(QClipboard::Clipboard == 0);
|
||||
Q_ASSERT(QClipboard::Selection == 1);
|
||||
m_xClipboard[QClipboard::Clipboard] = 0;
|
||||
m_xClipboard[QClipboard::Selection] = 0;
|
||||
m_clientClipboard[QClipboard::Clipboard] = 0;
|
||||
m_clientClipboard[QClipboard::Selection] = 0;
|
||||
m_timestamp[QClipboard::Clipboard] = XCB_CURRENT_TIME;
|
||||
@ -329,6 +327,10 @@ QXcbClipboard::~QXcbClipboard()
|
||||
}
|
||||
free(reply);
|
||||
}
|
||||
|
||||
if (m_clientClipboard[QClipboard::Clipboard] != m_clientClipboard[QClipboard::Selection])
|
||||
delete m_clientClipboard[QClipboard::Clipboard];
|
||||
delete m_clientClipboard[QClipboard::Selection];
|
||||
}
|
||||
|
||||
void QXcbClipboard::incrTransactionPeeker(xcb_generic_event_t *ge, bool &accepted)
|
||||
@ -378,9 +380,9 @@ QMimeData * QXcbClipboard::mimeData(QClipboard::Mode mode)
|
||||
return m_clientClipboard[mode];
|
||||
} else {
|
||||
if (!m_xClipboard[mode])
|
||||
m_xClipboard[mode] = new QXcbClipboardMime(mode, this);
|
||||
m_xClipboard[mode].reset(new QXcbClipboardMime(mode, this));
|
||||
|
||||
return m_xClipboard[mode];
|
||||
return m_xClipboard[mode].data();
|
||||
}
|
||||
}
|
||||
|
||||
@ -730,7 +732,7 @@ void QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve
|
||||
// here we care only about the xfixes events that come from non Qt processes
|
||||
if (event->owner != XCB_NONE && event->owner != owner()) {
|
||||
if (!m_xClipboard[mode]) {
|
||||
m_xClipboard[mode] = new QXcbClipboardMime(mode, this);
|
||||
m_xClipboard[mode].reset(new QXcbClipboardMime(mode, this));
|
||||
} else {
|
||||
m_xClipboard[mode]->reset();
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ private:
|
||||
QClipboard::Mode modeForAtom(xcb_atom_t atom) const;
|
||||
|
||||
// Selection and Clipboard
|
||||
QXcbClipboardMime *m_xClipboard[2];
|
||||
QScopedPointer<QXcbClipboardMime> m_xClipboard[2];
|
||||
QMimeData *m_clientClipboard[2];
|
||||
xcb_timestamp_t m_timestamp[2];
|
||||
|
||||
|
@ -94,7 +94,7 @@ QString QSqlRecordPrivate::createField(int index, const QString &prefix) const
|
||||
view within the database). QSqlRecord supports adding and
|
||||
removing fields as well as setting and retrieving field values.
|
||||
|
||||
The values of a record's fields' can be set by name or position
|
||||
The values of a record's fields can be set by name or position
|
||||
with setValue(); if you want to set a field to null use
|
||||
setNull(). To find the position of a field by name use indexOf(),
|
||||
and to find the name of a field at a particular position use
|
||||
|
@ -203,7 +203,10 @@ static QString classNameForInterface(const QString &interface, ClassType classTy
|
||||
return retval;
|
||||
}
|
||||
|
||||
static QByteArray qtTypeName(const QString &signature, const QDBusIntrospection::Annotations &annotations, int paramId = -1, const char *direction = "Out")
|
||||
// ### Qt6 Remove the two isSignal ifs
|
||||
// They are only here because before signal arguments where previously searched as "In" so to maintain compatibility
|
||||
// we first search for "Out" and if not found we search for "In"
|
||||
static QByteArray qtTypeName(const QString &signature, const QDBusIntrospection::Annotations &annotations, int paramId = -1, const char *direction = "Out", bool isSignal = false)
|
||||
{
|
||||
int type = QDBusMetaType::signatureToType(signature.toLatin1());
|
||||
if (type == QVariant::Invalid) {
|
||||
@ -220,9 +223,15 @@ static QByteArray qtTypeName(const QString &signature, const QDBusIntrospection:
|
||||
qttype = annotations.value(oldAnnotationName);
|
||||
|
||||
if (qttype.isEmpty()) {
|
||||
fprintf(stderr, "Got unknown type `%s'\n", qPrintable(signature));
|
||||
fprintf(stderr, "You should add <annotation name=\"%s\" value=\"<type>\"/> to the XML description\n",
|
||||
qPrintable(annotationName));
|
||||
if (!isSignal || qstrcmp(direction, "Out") == 0) {
|
||||
fprintf(stderr, "Got unknown type `%s'\n", qPrintable(signature));
|
||||
fprintf(stderr, "You should add <annotation name=\"%s\" value=\"<type>\"/> to the XML description\n",
|
||||
qPrintable(annotationName));
|
||||
}
|
||||
|
||||
if (isSignal)
|
||||
return qtTypeName(signature, annotations, paramId, "In", isSignal);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -322,6 +331,23 @@ static void writeArgList(QTextStream &ts, const QStringList &argNames,
|
||||
}
|
||||
}
|
||||
|
||||
static void writeSignalArgList(QTextStream &ts, const QStringList &argNames,
|
||||
const QDBusIntrospection::Annotations &annotations,
|
||||
const QDBusIntrospection::Arguments &outputArgs)
|
||||
{
|
||||
bool first = true;
|
||||
int argPos = 0;
|
||||
for (int i = 0; i < outputArgs.count(); ++i) {
|
||||
const QDBusIntrospection::Argument &arg = outputArgs.at(i);
|
||||
QString type = constRefArg(qtTypeName(arg.type, annotations, i, "Out", true /* isSignal */));
|
||||
|
||||
if (!first)
|
||||
ts << ", ";
|
||||
ts << type << argNames.at(argPos++);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
|
||||
static QString propertyGetter(const QDBusIntrospection::Property &property)
|
||||
{
|
||||
QString getter = property.annotations.value(QLatin1String("org.qtproject.QtDBus.PropertyGetter"));
|
||||
@ -636,7 +662,7 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf
|
||||
hs << "void " << signal.name << "(";
|
||||
|
||||
QStringList argNames = makeArgNames(signal.outputArgs);
|
||||
writeArgList(hs, argNames, signal.annotations, signal.outputArgs);
|
||||
writeSignalArgList(hs, argNames, signal.annotations, signal.outputArgs);
|
||||
|
||||
hs << ");" << endl; // finished for header
|
||||
}
|
||||
@ -980,7 +1006,7 @@ static void writeAdaptor(const QString &filename, const QDBusIntrospection::Inte
|
||||
hs << "void " << signal.name << "(";
|
||||
|
||||
QStringList argNames = makeArgNames(signal.outputArgs);
|
||||
writeArgList(hs, argNames, signal.annotations, signal.outputArgs);
|
||||
writeSignalArgList(hs, argNames, signal.annotations, signal.outputArgs);
|
||||
|
||||
hs << ");" << endl; // finished for header
|
||||
}
|
||||
|
@ -903,15 +903,13 @@ bool QFileSystemModel::setData(const QModelIndex &idx, const QVariant &value, in
|
||||
QFileSystemModelPrivate::QFileSystemNode *parentNode = indexNode->parent;
|
||||
int visibleLocation = parentNode->visibleLocation(parentNode->children.value(indexNode->fileName)->fileName);
|
||||
|
||||
d->addNode(parentNode, newName,indexNode->info->fileInfo());
|
||||
parentNode->visibleChildren.removeAt(visibleLocation);
|
||||
QFileSystemModelPrivate::QFileSystemNode * oldValue = parentNode->children.value(oldName);
|
||||
parentNode->children[newName] = oldValue;
|
||||
QFileInfo info(parentPath, newName);
|
||||
oldValue->fileName = newName;
|
||||
oldValue->parent = parentNode;
|
||||
#ifndef QT_NO_FILESYSTEMWATCHER
|
||||
oldValue->populate(d->fileInfoGatherer.getInfo(info));
|
||||
oldValue->populate(d->fileInfoGatherer.getInfo(QFileInfo(parentPath, newName)));
|
||||
#endif
|
||||
oldValue->isVisible = true;
|
||||
|
||||
|
@ -253,7 +253,7 @@
|
||||
\snippet shareddirmodel/main.cpp 0
|
||||
|
||||
The model is set up to use data from a certain file system. The call to
|
||||
\l{QFileSystemModel::}{setRootPath()} tell the model which drive on the
|
||||
\l{QFileSystemModel::}{setRootPath()} tells the model which drive on the
|
||||
file system to expose to the views.
|
||||
|
||||
We create two views so that we can examine the items held in the model in two
|
||||
@ -304,7 +304,7 @@
|
||||
signals and slots mechanism.
|
||||
|
||||
This section describes some basic concepts that are central to the way
|
||||
item of data are accessed by other components via a model class. More
|
||||
items of data are accessed by other components via a model class. More
|
||||
advanced concepts are discussed in later sections.
|
||||
|
||||
\section3 Model indexes
|
||||
@ -1869,7 +1869,7 @@
|
||||
\codeline
|
||||
\snippet qsortfilterproxymodel/main.cpp 1
|
||||
|
||||
Since proxy models are inherit from QAbstractItemModel, they can be connected to
|
||||
Since proxy models inherit from QAbstractItemModel, they can be connected to
|
||||
any kind of view, and can be shared between views. They can also be used to
|
||||
process the information obtained from other proxy models in a pipeline arrangement.
|
||||
|
||||
|
@ -769,7 +769,6 @@ void qDrawPlainRect(QPainter *p, const QRect &r, const QColor &c,
|
||||
\fn void qDrawBorderPixmap(QPainter *painter, const QRect &target, const QMargins &margins, const QPixmap &pixmap)
|
||||
\relates <qdrawutil.h>
|
||||
\since 4.6
|
||||
\overload
|
||||
|
||||
\brief The qDrawBorderPixmap function is for drawing a pixmap into
|
||||
the margins of a rectangle.
|
||||
|
@ -4952,7 +4952,7 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp()
|
||||
const int maxRate = rate * 1024 * (100+allowedDeviation) / 100;
|
||||
qDebug() << minRate << "<="<< server.transferRate << "<=" << maxRate << '?';
|
||||
// The test takes too long to run if sending enough data to overwhelm the
|
||||
// reciever's kernel buffers.
|
||||
// receiver's kernel buffers.
|
||||
//QEXPECT_FAIL("http+limited", "Limiting is broken right now, check QTBUG-15065", Continue);
|
||||
//QEXPECT_FAIL("https+limited", "Limiting is broken right now, check QTBUG-15065", Continue);
|
||||
//QVERIFY(server.transferRate >= minRate && server.transferRate <= maxRate);
|
||||
|
@ -1223,7 +1223,7 @@ void tst_QCompleter::task178797_activatedOnReturn()
|
||||
words << "foobar1" << "foobar2";
|
||||
QLineEdit ledit;
|
||||
setFrameless(&ledit);
|
||||
QCompleter *completer = new QCompleter(words);
|
||||
QCompleter *completer = new QCompleter(words, &ledit);
|
||||
ledit.setCompleter(completer);
|
||||
QSignalSpy spy(completer, SIGNAL(activated(QString)));
|
||||
QCOMPARE(spy.count(), 0);
|
||||
@ -1330,7 +1330,7 @@ public:
|
||||
|
||||
task250064_TextEdit()
|
||||
{
|
||||
completer = new QCompleter;
|
||||
completer = new QCompleter(this);
|
||||
completer->setWidget(this);
|
||||
}
|
||||
|
||||
|
@ -377,8 +377,8 @@ static QString glue(const QString &s1, const QString &s2)
|
||||
void tst_QUndoGroup::checkSignals()
|
||||
{
|
||||
QUndoGroup group;
|
||||
QAction *undo_action = group.createUndoAction(0, QString("foo"));
|
||||
QAction *redo_action = group.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undo_action(group.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redo_action(group.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&group, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&group, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&group, SIGNAL(canUndoChanged(bool)));
|
||||
@ -590,9 +590,6 @@ void tst_QUndoGroup::checkSignals()
|
||||
true, // indexChanged
|
||||
true, // undoChanged
|
||||
true) // redoChanged
|
||||
|
||||
delete undo_action;
|
||||
delete redo_action;
|
||||
}
|
||||
|
||||
void tst_QUndoGroup::addStackAndDie()
|
||||
@ -629,8 +626,8 @@ void tst_QUndoGroup::commandTextFormat()
|
||||
qApp->installTranslator(&translator);
|
||||
|
||||
QUndoGroup group;
|
||||
QAction *undo_action = group.createUndoAction(0);
|
||||
QAction *redo_action = group.createRedoAction(0);
|
||||
const QScopedPointer<QAction> undo_action(group.createUndoAction(0));
|
||||
const QScopedPointer<QAction> redo_action(group.createRedoAction(0));
|
||||
|
||||
QCOMPARE(undo_action->text(), QString("Undo-default-text"));
|
||||
QCOMPARE(redo_action->text(), QString("Redo-default-text"));
|
||||
|
@ -257,8 +257,8 @@ static QString glue(const QString &s1, const QString &s2)
|
||||
static void checkState(QSignalSpy &redoTextChangedSpy,
|
||||
QSignalSpy &canRedoChangedSpy,
|
||||
QSignalSpy &undoTextChangedSpy,
|
||||
QAction *const redoAction,
|
||||
QAction *const undoAction,
|
||||
const QScopedPointer<QAction> &redoAction,
|
||||
const QScopedPointer<QAction> &undoAction,
|
||||
QSignalSpy &canUndoChangedSpy,
|
||||
QSignalSpy &cleanChangedSpy,
|
||||
QSignalSpy &indexChangedSpy,
|
||||
@ -327,8 +327,8 @@ static void checkState(QSignalSpy &redoTextChangedSpy,
|
||||
void tst_QUndoStack::undoRedo()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(0, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -688,8 +688,8 @@ void tst_QUndoStack::undoRedo()
|
||||
void tst_QUndoStack::setIndex()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(0, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -952,8 +952,8 @@ void tst_QUndoStack::setIndex()
|
||||
void tst_QUndoStack::setClean()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(0, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -1205,8 +1205,8 @@ void tst_QUndoStack::setClean()
|
||||
void tst_QUndoStack::clear()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(this, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(this, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -1403,8 +1403,8 @@ void tst_QUndoStack::clear()
|
||||
void tst_QUndoStack::childCommand()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(0, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -1508,16 +1508,13 @@ void tst_QUndoStack::childCommand()
|
||||
true, // indexChanged
|
||||
true, // undoChanged
|
||||
true); // redoChanged
|
||||
|
||||
delete undoAction;
|
||||
delete redoAction;
|
||||
}
|
||||
|
||||
void tst_QUndoStack::macroBeginEnd()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(0, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -1978,16 +1975,13 @@ void tst_QUndoStack::macroBeginEnd()
|
||||
true, // indexChanged
|
||||
true, // undoChanged
|
||||
true); // redoChanged
|
||||
|
||||
delete undoAction;
|
||||
delete redoAction;
|
||||
}
|
||||
|
||||
void tst_QUndoStack::compression()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(0, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -2423,16 +2417,13 @@ void tst_QUndoStack::compression()
|
||||
true, // indexChanged
|
||||
true, // undoChanged
|
||||
true); // redoChanged
|
||||
|
||||
delete undoAction;
|
||||
delete redoAction;
|
||||
}
|
||||
|
||||
void tst_QUndoStack::undoLimit()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undoAction = stack.createUndoAction(0, QString("foo"));
|
||||
QAction *redoAction = stack.createRedoAction(0, QString("bar"));
|
||||
const QScopedPointer<QAction> undoAction(stack.createUndoAction(0, QString("foo")));
|
||||
const QScopedPointer<QAction> redoAction(stack.createRedoAction(0, QString("bar")));
|
||||
QSignalSpy indexChangedSpy(&stack, SIGNAL(indexChanged(int)));
|
||||
QSignalSpy cleanChangedSpy(&stack, SIGNAL(cleanChanged(bool)));
|
||||
QSignalSpy canUndoChangedSpy(&stack, SIGNAL(canUndoChanged(bool)));
|
||||
@ -2972,8 +2963,8 @@ void tst_QUndoStack::commandTextFormat()
|
||||
qApp->installTranslator(&translator);
|
||||
|
||||
QUndoStack stack;
|
||||
QAction *undo_action = stack.createUndoAction(0);
|
||||
QAction *redo_action = stack.createRedoAction(0);
|
||||
const QScopedPointer<QAction> undo_action(stack.createUndoAction(0));
|
||||
const QScopedPointer<QAction> redo_action(stack.createRedoAction(0));
|
||||
|
||||
QCOMPARE(undo_action->text(), QString("Undo-default-text"));
|
||||
QCOMPARE(redo_action->text(), QString("Redo-default-text"));
|
||||
@ -3000,8 +2991,8 @@ void tst_QUndoStack::commandTextFormat()
|
||||
void tst_QUndoStack::separateUndoText()
|
||||
{
|
||||
QUndoStack stack;
|
||||
QAction *undo_action = stack.createUndoAction(0);
|
||||
QAction *redo_action = stack.createRedoAction(0);
|
||||
const QScopedPointer<QAction> undo_action(stack.createUndoAction(0));
|
||||
const QScopedPointer<QAction> redo_action(stack.createRedoAction(0));
|
||||
|
||||
QUndoCommand *command1 = new IdleCommand();
|
||||
QUndoCommand *command2 = new IdleCommand();
|
||||
|
Loading…
x
Reference in New Issue
Block a user