summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp10
-rw-r--r--tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp10
-rw-r--r--tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp4
-rw-r--r--tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp4
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp36
-rw-r--r--tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp8
-rw-r--r--tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp28
-rw-r--r--tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp22
-rw-r--r--tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp26
-rw-r--r--tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp90
-rw-r--r--tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp2
-rw-r--r--tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp4
-rw-r--r--tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp318
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp42
-rw-r--r--tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp2
-rw-r--r--tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp18
-rw-r--r--tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp2
-rw-r--r--tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp4
-rw-r--r--tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp2
-rw-r--r--tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp6
-rw-r--r--tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp56
-rw-r--r--tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp6
-rw-r--r--tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp6
28 files changed, 359 insertions, 359 deletions
diff --git a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
index 1aab794e1b..d8833e232d 100644
--- a/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
+++ b/tests/auto/widgets/dialogs/qdialog/tst_qdialog.cpp
@@ -200,7 +200,7 @@ void tst_QDialog::showExtension()
// show
((DummyDialog*)testWidget)->showExtension( true );
// while ( testWidget->size() == dlgSize )
-// qApp->processEvents();
+// qApp->processEvents();
QTEST( testWidget->size(), "result" );
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index b9e6c82d84..217fb4c30b 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -310,10 +310,10 @@ void tst_QFileDialog2::unc()
void tst_QFileDialog2::emptyUncPath()
{
QNonNativeFileDialog fd;
- fd.show();
+ fd.show();
QLineEdit *lineEdit = fd.findChild<QLineEdit*>("fileNameEdit");
QVERIFY(lineEdit);
- // press 'keys' for the input
+ // press 'keys' for the input
for (int i = 0; i < 3 ; ++i)
QTest::keyPress(lineEdit, Qt::Key_Backslash);
QFileSystemModel *model = fd.findChild<QFileSystemModel*>("qt_filesystem_model");
diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
index 3a1f650351..b29bf44307 100644
--- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
+++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
@@ -164,12 +164,12 @@ void tst_QFileSystemModel::cleanup()
for (int i = 0; i < list.count(); ++i) {
QFileInfo fi(dir.path() + '/' + list.at(i));
if (fi.exists() && fi.isFile()) {
- QFile p(fi.absoluteFilePath());
+ QFile p(fi.absoluteFilePath());
p.setPermissions(QFile::ReadUser | QFile::ReadOwner | QFile::ExeOwner | QFile::ExeUser | QFile::WriteUser | QFile::WriteOwner | QFile::WriteOther);
- QFile dead(dir.path() + '/' + list.at(i));
- dead.remove();
- }
- if (fi.exists() && fi.isDir())
+ QFile dead(dir.path() + '/' + list.at(i));
+ dead.remove();
+ }
+ if (fi.exists() && fi.isDir())
QVERIFY(dir.rmdir(list.at(i)));
}
list = dir.entryList(QDir::AllEntries | QDir::System | QDir::Hidden | QDir::NoDotAndDotDot);
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
index 1762e40a9d..6eb36115cb 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
@@ -108,11 +108,11 @@ void tst_QFontDialog::cleanup()
void tst_QFontDialog::postKeyReturn() {
QWidgetList list = QApplication::topLevelWidgets();
for (int i=0; i<list.count(); ++i) {
- QFontDialog *dialog = qobject_cast<QFontDialog*>(list[i]);
- if (dialog) {
- QTest::keyClick( list[i], Qt::Key_Return, Qt::NoModifier );
- return;
- }
+ QFontDialog *dialog = qobject_cast<QFontDialog*>(list[i]);
+ if (dialog) {
+ QTest::keyClick( list[i], Qt::Key_Return, Qt::NoModifier );
+ return;
+ }
}
}
diff --git a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
index 7d8077d77d..abd120db86 100644
--- a/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
+++ b/tests/auto/widgets/dialogs/qinputdialog/tst_qinputdialog.cpp
@@ -110,7 +110,7 @@ void testTypingValue(
sbox->selectAll();
for (int i = 0; i < value.size(); ++i) {
const QChar valChar = value[i];
- _keyClick(static_cast<QWidget *>(sbox), valChar.toLatin1()); // ### always guaranteed to work?
+ _keyClick(static_cast<QWidget *>(sbox), valChar.toLatin1()); // ### always guaranteed to work?
if (sbox->hasAcceptableInput())
QVERIFY(okButton->isEnabled());
else
@@ -123,7 +123,7 @@ void testTypingValue(QLineEdit *ledit, QPushButton *okButton, const QString &val
ledit->selectAll();
for (int i = 0; i < value.size(); ++i) {
const QChar valChar = value[i];
- _keyClick(ledit, valChar.toLatin1()); // ### always guaranteed to work?
+ _keyClick(ledit, valChar.toLatin1()); // ### always guaranteed to work?
QVERIFY(ledit->hasAcceptableInput());
QVERIFY(okButton->isEnabled());
}
diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
index 25a82050e3..4c07b48c00 100644
--- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
+++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
@@ -1812,7 +1812,7 @@ public:
QWizardPage *page_to_delete = page(id);
removePage(id);
delete page_to_delete;
- }
+ }
}
void applyOperations(const QList<Operation *> &operations)
diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index 1ffb5c3b5c..78ab8027d8 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -2974,7 +2974,7 @@ void tst_QGraphicsGridLayout::geometries()
void tst_QGraphicsGridLayout::avoidRecursionInInsertItem()
{
QGraphicsWidget window(0, Qt::Window);
- QGraphicsGridLayout *layout = new QGraphicsGridLayout(&window);
+ QGraphicsGridLayout *layout = new QGraphicsGridLayout(&window);
QCOMPARE(layout->count(), 0);
QTest::ignoreMessage(QtWarningMsg, "QGraphicsGridLayout::addItem: cannot insert itself");
layout->addItem(layout, 0, 0);
diff --git a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
index 8f7a3a3255..6a3e69d0a8 100644
--- a/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp
@@ -774,7 +774,7 @@ void tst_QGraphicsLinearLayout::orientation()
layout.setOrientation(orientation);
QCOMPARE(layout.orientation(), orientation);
- // important to resize to preferredsize when orientation is switched
+ // important to resize to preferredsize when orientation is switched
widget->resize(widget->effectiveSizeHint(Qt::PreferredSize));
qApp->processEvents();
for (i = 0; i < positions.count(); ++i) {
@@ -1561,7 +1561,7 @@ void tst_QGraphicsLinearLayout::removeLayout()
void tst_QGraphicsLinearLayout::avoidRecursionInInsertItem()
{
QGraphicsWidget window(0, Qt::Window);
- QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(&window);
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(&window);
QCOMPARE(layout->count(), 0);
QTest::ignoreMessage(QtWarningMsg, "QGraphicsLinearLayout::insertItem: cannot insert itself");
layout->insertItem(0, layout);
diff --git a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
index 92de2c6733..d3f6c2db00 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
@@ -1230,17 +1230,17 @@ void tst_QGraphicsProxyWidget::mousePressReleaseEvent()
view.resize(100, 100);
if (hasWidget) {
proxy->setWidget(widget);
- proxy->show();
+ proxy->show();
}
proxy->setPos(50, 0);
scene.addItem(proxy);
proxy->setFocus();
QTest::mousePress(view.viewport(), Qt::LeftButton, 0,
- view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center())));
+ view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center())));
QTRY_COMPARE(spy.count(), 0);
QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0,
- view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center())));
+ view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center())));
QTRY_COMPARE(spy.count(), (hasWidget) ? 1 : 0);
if (!hasWidget)
@@ -1439,16 +1439,16 @@ class View : public QGraphicsView
{
public:
View(QGraphicsScene *scene, QWidget *parent = 0)
- : QGraphicsView(scene, parent), npaints(0)
+ : QGraphicsView(scene, parent), npaints(0)
{ }
QRegion paintEventRegion;
int npaints;
protected:
void paintEvent(QPaintEvent *event)
{
- ++npaints;
- paintEventRegion += event->region();
- QGraphicsView::paintEvent(event);
+ ++npaints;
+ paintEventRegion += event->region();
+ QGraphicsView::paintEvent(event);
}
};
@@ -1458,7 +1458,7 @@ class ScrollWidget : public QWidget
public:
ScrollWidget() : npaints(0)
{
- resize(200, 200);
+ resize(200, 200);
}
QRegion paintEventRegion;
int npaints;
@@ -1466,17 +1466,17 @@ public:
public slots:
void updateScroll()
{
- update(0, 0, 200, 10);
- scroll(0, 10, QRect(0, 0, 100, 20));
+ update(0, 0, 200, 10);
+ scroll(0, 10, QRect(0, 0, 100, 20));
}
protected:
void paintEvent(QPaintEvent *event)
{
- ++npaints;
- paintEventRegion += event->region();
- QPainter painter(this);
- painter.fillRect(event->rect(), Qt::blue);
+ ++npaints;
+ paintEventRegion += event->region();
+ QPainter painter(this);
+ painter.fillRect(event->rect(), Qt::blue);
}
};
@@ -1502,7 +1502,7 @@ void tst_QGraphicsProxyWidget::scrollUpdate()
// QRect(0, 12, 102, 10) is the scroll update, expanded (-2, -2, 2, 2),
// intersected with the above update.
QCOMPARE(view.paintEventRegion.rects(),
- QVector<QRect>() << QRect(0, 0, 200, 12) << QRect(0, 12, 102, 10));
+ QVector<QRect>() << QRect(0, 0, 200, 12) << QRect(0, 12, 102, 10));
QCOMPARE(widget->npaints, 2);
QCOMPARE(widget->paintEventRegion.rects(),
QVector<QRect>() << QRect(0, 0, 200, 12) << QRect(0, 12, 102, 10));
@@ -2458,7 +2458,7 @@ void tst_QGraphicsProxyWidget::popup_basic()
QComboBox *box = new QComboBox;
box->setGeometry(0, 0, 320, 40);
box->addItems(QStringList() << "monday" << "tuesday" << "wednesday"
- << "thursday" << "saturday" << "sunday");
+ << "thursday" << "saturday" << "sunday");
QCOMPARE(proxy->childItems().count(), 0);
proxy->setWidget(box);
proxy->show();
@@ -2472,7 +2472,7 @@ void tst_QGraphicsProxyWidget::popup_basic()
QApplication::processEvents();
QTest::mousePress(view.viewport(), Qt::LeftButton, 0,
- view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center())));
+ view.mapFromScene(proxy->mapToScene(proxy->boundingRect().center())));
QTRY_COMPARE(box->pos(), QPoint());
@@ -2511,7 +2511,7 @@ void tst_QGraphicsProxyWidget::popup_subwidget()
QComboBox *box = new QComboBox;
box->addItems(QStringList() << "monday" << "tuesday" << "wednesday"
- << "thursday" << "saturday" << "sunday");
+ << "thursday" << "saturday" << "sunday");
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(new QLineEdit("QLineEdit"));
diff --git a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
index 97ea7d7d32..e4167aacad 100644
--- a/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
+++ b/tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp
@@ -216,10 +216,10 @@ private slots:
void persistentEditorFocus();
void setItemDelegate();
void setItemDelegate_data();
- // The dragAndDrop() test doesn't work, and is thus disabled on Mac and Windows
- // for the following reasons:
- // Mac: use of GetCurrentEventButtonState() in QDragManager::drag()
- // Win: unknown reason
+ // The dragAndDrop() test doesn't work, and is thus disabled on Mac and Windows
+ // for the following reasons:
+ // Mac: use of GetCurrentEventButtonState() in QDragManager::drag()
+ // Win: unknown reason
#if !defined(Q_OS_MAC) && !defined(Q_OS_WIN)
#if 0
void dragAndDrop();
diff --git a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
index 42975cfb5e..153144db63 100644
--- a/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
+++ b/tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
@@ -1646,29 +1646,29 @@ void tst_QListWidget::QTBUG8086_currentItemChangedOnClick()
class ItemDelegate : public QItemDelegate
{
public:
- ItemDelegate(QObject *parent = 0) : QItemDelegate(parent)
- {}
- virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const
- {
- QLineEdit *lineEdit = new QLineEdit(parent);
- lineEdit->setFrame(false);
- QCompleter *completer = new QCompleter(QStringList() << "completer", lineEdit);
- completer->setCompletionMode(QCompleter::InlineCompletion);
- lineEdit->setCompleter(completer);
- return lineEdit;
- }
+ ItemDelegate(QObject *parent = 0) : QItemDelegate(parent)
+ {}
+ virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &) const
+ {
+ QLineEdit *lineEdit = new QLineEdit(parent);
+ lineEdit->setFrame(false);
+ QCompleter *completer = new QCompleter(QStringList() << "completer", lineEdit);
+ completer->setCompletionMode(QCompleter::InlineCompletion);
+ lineEdit->setCompleter(completer);
+ return lineEdit;
+ }
};
void tst_QListWidget::QTBUG14363_completerWithAnyKeyPressedEditTriggers()
{
- QListWidget listWidget;
- listWidget.setEditTriggers(QAbstractItemView::AnyKeyPressed);
+ QListWidget listWidget;
+ listWidget.setEditTriggers(QAbstractItemView::AnyKeyPressed);
listWidget.setItemDelegate(new ItemDelegate);
QListWidgetItem *item = new QListWidgetItem(QLatin1String("select an item (don't start editing)"), &listWidget);
item->setFlags(Qt::ItemIsEnabled|Qt::ItemIsSelectable|Qt::ItemIsEditable);
new QListWidgetItem(QLatin1String("try to type the letter 'c'"), &listWidget);
new QListWidgetItem(QLatin1String("completer"), &listWidget);
- listWidget.show();
+ listWidget.show();
listWidget.setCurrentItem(item);
qApp->setActiveWindow(&listWidget);
QVERIFY(QTest::qWaitForWindowActive(&listWidget));
diff --git a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
index 76ac6bcf19..f7613a59f3 100644
--- a/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
+++ b/tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
@@ -1643,7 +1643,7 @@ void tst_QTableView::selection()
view.setColumnWidth(c, columnWidth);
view.setSelection(QRect(x, y, width, height),
- QItemSelectionModel::SelectionFlags(command));
+ QItemSelectionModel::SelectionFlags(command));
QCOMPARE(view.selectedIndexes().count(), selectedCount);
}
@@ -2950,7 +2950,7 @@ void tst_QTableView::span()
if (hiddenRow > -1) {
QModelIndex hidden = model.index(hiddenRow, columnCount - 1);
- QVERIFY(view.isIndexHidden(hidden));
+ QVERIFY(view.isIndexHidden(hidden));
}
if (hiddenColumn > -1) {
@@ -3597,7 +3597,7 @@ void tst_QTableView::task173773_updateVerticalHeader()
void tst_QTableView::task227953_setRootIndex()
{
- QTableView tableView;
+ QTableView tableView;
//model = tree with two items with tables as children
QStandardItemModel model;
@@ -3619,16 +3619,16 @@ void tst_QTableView::task227953_setRootIndex()
//show the first 10 rows of the first table
QModelIndex root = model.indexFromItem(&item1);
- tableView.setRootIndex(root);
- for (int i = 10; i != 40; ++i) {
- tableView.setRowHidden(i, true);
- }
+ tableView.setRootIndex(root);
+ for (int i = 10; i != 40; ++i) {
+ tableView.setRowHidden(i, true);
+ }
QCOMPARE(tableView.verticalHeader()->count(), 40);
QCOMPARE(tableView.verticalHeader()->hiddenSectionCount(), 30);
- //show the first 10 rows of the second table
- tableView.setRootIndex(model.indexFromItem(&item2));
+ //show the first 10 rows of the second table
+ tableView.setRootIndex(model.indexFromItem(&item2));
QCOMPARE(tableView.verticalHeader()->count(), 10);
QCOMPARE(tableView.verticalHeader()->hiddenSectionCount(), 0);
@@ -3670,8 +3670,8 @@ void tst_QTableView::task248688_autoScrollNavigation()
QTableView view;
view.setModel(&model);
- view.hideColumn(8);
- view.hideRow(8);
+ view.hideColumn(8);
+ view.hideRow(8);
view.show();
for (int r = 0; r < model.rowCount(); ++r) {
if (view.isRowHidden(r))
diff --git a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
index d2625c400a..dfa7592813 100644
--- a/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
+++ b/tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
@@ -1467,14 +1467,14 @@ void tst_QTreeWidget::keyboardNavigation()
QVector<Qt::Key> keymoves;
keymoves << Qt::Key_Down << Qt::Key_Right << Qt::Key_Left
- << Qt::Key_Down << Qt::Key_Down << Qt::Key_Down << Qt::Key_Down
- << Qt::Key_Right
- << Qt::Key_Up << Qt::Key_Left << Qt::Key_Left
- << Qt::Key_Up << Qt::Key_Down << Qt::Key_Up << Qt::Key_Up
- << Qt::Key_Up << Qt::Key_Up << Qt::Key_Up << Qt::Key_Up
+ << Qt::Key_Down << Qt::Key_Down << Qt::Key_Down << Qt::Key_Down
+ << Qt::Key_Right
+ << Qt::Key_Up << Qt::Key_Left << Qt::Key_Left
+ << Qt::Key_Up << Qt::Key_Down << Qt::Key_Up << Qt::Key_Up
+ << Qt::Key_Up << Qt::Key_Up << Qt::Key_Up << Qt::Key_Up
<< Qt::Key_Down << Qt::Key_Right << Qt::Key_Down << Qt::Key_Down
<< Qt::Key_Down << Qt::Key_Right << Qt::Key_Down << Qt::Key_Down
- << Qt::Key_Left << Qt::Key_Left << Qt::Key_Up << Qt::Key_Down
+ << Qt::Key_Left << Qt::Key_Left << Qt::Key_Up << Qt::Key_Down
<< Qt::Key_Up << Qt::Key_Up << Qt::Key_Up << Qt::Key_Left
<< Qt::Key_Down << Qt::Key_Right << Qt::Key_Right << Qt::Key_Right
<< Qt::Key_Left << Qt::Key_Left << Qt::Key_Right << Qt::Key_Left;
@@ -1499,16 +1499,16 @@ void tst_QTreeWidget::keyboardNavigation()
switch (key) {
case Qt::Key_Up:
- if (row > 0) {
+ if (row > 0) {
if (item->parent())
item = item->parent()->child(row - 1);
else
item = testWidget->topLevelItem(row - 1);
- row -= 1;
- } else if (item->parent()) {
- item = item->parent();
- row = item->parent() ? item->parent()->indexOfChild(item) : testWidget->indexOfTopLevelItem(item);
- }
+ row -= 1;
+ } else if (item->parent()) {
+ item = item->parent();
+ row = item->parent() ? item->parent()->indexOfChild(item) : testWidget->indexOfTopLevelItem(item);
+ }
break;
case Qt::Key_Down:
if (testWidget->isItemExpanded(item)) {
@@ -1537,7 +1537,7 @@ void tst_QTreeWidget::keyboardNavigation()
case Qt::Key_Right:
if (checkScroll)
QCOMPARE(scrollBar->value(), valueBeforeClick + scrollBar->singleStep());
- // windows style right will walk to the first child
+ // windows style right will walk to the first child
if (testWidget->currentItem() != item) {
QCOMPARE(testWidget->currentItem()->parent(), item);
row = item->indexOfChild(testWidget->currentItem());
diff --git a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
index e13dfe836f..9d7d3d1f34 100644
--- a/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
+++ b/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
@@ -288,7 +288,7 @@ public:
TestApplication( int &argc, char **argv )
: QApplication( argc, argv)
{
- startTimer( 150 );
+ startTimer( 150 );
}
void timerEvent( QTimerEvent * )
@@ -338,24 +338,24 @@ void tst_QApplication::multiple()
int i = 0;
int argc = 0;
- while ( i++ < 5 ) {
- TestApplication app( argc, 0 );
-
- if ( features.contains( "QFont" ) ) {
- // create font and force loading
- QFont font( "Arial", 12 );
- QFontInfo finfo( font );
- finfo.exactMatch();
- }
- if ( features.contains( "QPixmap" ) ) {
- QPixmap pix( 100, 100 );
- pix.fill( Qt::black );
- }
- if ( features.contains( "QWidget" ) ) {
- QWidget widget;
- }
-
- QVERIFY(!app.exec());
+ while (i++ < 5) {
+ TestApplication app(argc, 0);
+
+ if (features.contains("QFont")) {
+ // create font and force loading
+ QFont font("Arial", 12);
+ QFontInfo finfo(font);
+ finfo.exactMatch();
+ }
+ if (features.contains("QPixmap")) {
+ QPixmap pix(100, 100);
+ pix.fill(Qt::black);
+ }
+ if (features.contains("QWidget")) {
+ QWidget widget;
+ }
+
+ QVERIFY(!app.exec());
}
}
@@ -384,29 +384,29 @@ void tst_QApplication::setFont_data()
QFontDatabase fdb;
QStringList families = fdb.families();
for (QStringList::const_iterator itr = families.begin();
- itr != families.end();
- ++itr) {
- if (cnt < 3) {
- QString family = *itr;
- QStringList styles = fdb.styles(family);
- if (styles.size() > 0) {
- QString style = styles.first();
- QList<int> sizes = fdb.pointSizes(family, style);
- if (!sizes.size())
- sizes = fdb.standardSizes();
- if (sizes.size() > 0) {
- QTest::newRow(QString("data%1a").arg(cnt).toLatin1().constData())
- << family
- << sizes.first()
+ itr != families.end();
+ ++itr) {
+ if (cnt < 3) {
+ QString family = *itr;
+ QStringList styles = fdb.styles(family);
+ if (styles.size() > 0) {
+ QString style = styles.first();
+ QList<int> sizes = fdb.pointSizes(family, style);
+ if (!sizes.size())
+ sizes = fdb.standardSizes();
+ if (sizes.size() > 0) {
+ QTest::newRow(QString("data%1a").arg(cnt).toLatin1().constData())
+ << family
+ << sizes.first()
<< false;
- QTest::newRow(QString("data%1b").arg(cnt).toLatin1().constData())
- << family
- << sizes.first()
+ QTest::newRow(QString("data%1b").arg(cnt).toLatin1().constData())
+ << family
+ << sizes.first()
<< true;
}
- }
- }
- ++cnt;
+ }
+ }
+ ++cnt;
}
QTest::newRow("nonexistingfont after") << "nosuchfont_probably_quiteunlikely"
@@ -452,7 +452,7 @@ void tst_QApplication::args_data()
QTest::newRow( "No arguments" ) << 0 << QString() << 0 << QString();
QTest::newRow( "App name, style" ) << 3 << "/usr/bin/appname -style windows" << 1 << "/usr/bin/appname";
QTest::newRow( "App name, style, arbitrary, reverse" ) << 5 << "/usr/bin/appname -style windows -arbitrary -reverse"
- << 2 << "/usr/bin/appname -arbitrary";
+ << 2 << "/usr/bin/appname -arbitrary";
}
void tst_QApplication::task109149()
@@ -491,14 +491,14 @@ static QString cstrings2QString( char **args )
{
QString string;
if ( !args )
- return string;
+ return string;
int i = 0;
while ( args[i] ) {
- string += args[i];
- if ( args[i+1] )
- string += " ";
- ++i;
+ string += args[i];
+ if ( args[i+1] )
+ string += " ";
+ ++i;
}
return string;
}
diff --git a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
index d04b812878..9df7e1662d 100644
--- a/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
+++ b/tests/auto/widgets/kernel/qformlayout/tst_qformlayout.cpp
@@ -263,7 +263,7 @@ void tst_QFormLayout::wrapping()
{
QWidget *w = new QWidget;
QFormLayout *fl = new QFormLayout(w);
- fl->setRowWrapPolicy(QFormLayout::WrapLongRows);
+ fl->setRowWrapPolicy(QFormLayout::WrapLongRows);
QLineEdit *le = new QLineEdit;
QLabel *lbl = new QLabel("A long label");
diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
index e067b071e7..1003a9fb1f 100644
--- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
+++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp
@@ -974,8 +974,8 @@ QRect CustomLayoutStyle::subElementRect(SubElement sr, const QStyleOption *opt,
case SE_GroupBoxLayoutItem:
rect = opt->rect.adjusted(0, +10, 0, 0);
break;
- default:
- break;
+ default:
+ break;
}
}
if (rect.isNull())
diff --git a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
index 962fd3a8ab..306b049467 100644
--- a/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
+++ b/tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
@@ -160,7 +160,7 @@ class TestEdit : public QTextEdit
Q_OBJECT
public:
TestEdit(QWidget *parent, const char *name)
- : QTextEdit(parent)
+ : QTextEdit(parent)
{
setObjectName(name);
}
@@ -231,13 +231,13 @@ Qt::KeyboardModifiers tst_QShortcut::toButtons( int key )
{
Qt::KeyboardModifiers result = Qt::NoModifier;
if ( key & Qt::SHIFT )
- result |= Qt::ShiftModifier;
+ result |= Qt::ShiftModifier;
if ( key & Qt::CTRL )
- result |= Qt::ControlModifier;
- if ( key & Qt::META )
- result |= Qt::MetaModifier;
- if ( key & Qt::ALT )
- result |= Qt::AltModifier;
+ result |= Qt::ControlModifier;
+ if ( key & Qt::META )
+ result |= Qt::MetaModifier;
+ if ( key & Qt::ALT )
+ result |= Qt::AltModifier;
return result;
}
@@ -291,15 +291,15 @@ void tst_QShortcut::number_data()
Shift + Qt::Key_Plus on Qt::Key_Pluss
Qt::Key_Plus on Qt::Key_Pluss
*/
- QTest::newRow("N001 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N001 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("N001:Shift + M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N001:M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N001 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ //QTest::newRow("N001:Shift + M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N001:M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N001 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("N001:Shift++ [+]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N001:+ [+]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N001 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ //QTest::newRow("N001:Shift++ [+]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N001:+ [+]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N001 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Shift + Qt::Key_M on Shift + Qt::Key_M
@@ -307,32 +307,32 @@ void tst_QShortcut::number_data()
Shift + Qt::Key_Plus on Shift + Qt::Key_Pluss
Qt::Key_Plus on Shift + Qt::Key_Pluss
*/
- QTest::newRow("N002 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N002:Shift+M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N002:M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N002 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N002:Shift++ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N002:+ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N002 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N002 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N002:Shift+M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N002:M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N002 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N002:Shift++ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N002:+ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N002 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Shift + Qt::Key_F1 on Qt::Key_F1
Qt::Key_F1 on Qt::Key_F1
*/
- QTest::newRow("N003 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N003 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("N003:Shift+F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N003:F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N003 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ //QTest::newRow("N003:Shift+F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N003:F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N003 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Shift + Qt::Key_F1 on Shift + Qt::Key_F1
Qt::Key_F1 on Shift + Qt::Key_F1
*/
- QTest::newRow("N004 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N004:Shift+F1 - [Shift+F1]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N004 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N004:Shift+F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Qt::Key_Tab on Qt::Key_Tab
@@ -340,14 +340,14 @@ void tst_QShortcut::number_data()
Qt::Key_Backtab on Qt::Key_Tab
Shift + Qt::Key_Backtab on Qt::Key_Tab
*/
- QTest::newRow("N005a - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N005a:Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N005a - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N005a:Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("N005a:Shift+Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ //QTest::newRow("N005a:Shift+Tab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
// (Shift+)BackTab != Tab, but Shift+BackTab == Shift+Tab
- QTest::newRow("N005a:Backtab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N005a:Shift+Backtab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N005a - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N005a:Backtab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N005a:Shift+Backtab - [Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N005a - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Qt::Key_Tab on Shift + Qt::Key_Tab
@@ -355,12 +355,12 @@ void tst_QShortcut::number_data()
Qt::Key_Backtab on Shift + Qt::Key_Tab
Shift + Qt::Key_Backtab on Shift + Qt::Key_Tab
*/
- QTest::newRow("N005b - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N005b:Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N005b:Shift+Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N005b:BackTab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N005b:Shift+BackTab - [Shift+Tab]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N005b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N005b - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N005b:Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N005b:Shift+Tab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N005b:BackTab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N005b:Shift+BackTab - [Shift+Tab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N005b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Qt::Key_Tab on Qt::Key_Backtab
@@ -368,15 +368,15 @@ void tst_QShortcut::number_data()
Qt::Key_Backtab on Qt::Key_Backtab
Shift + Qt::Key_Backtab on Qt::Key_Backtab
*/
- QTest::newRow("N006a - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N006a:Tab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N006a - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N006a:Tab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
// This should work, since platform dependent code will transform the
// Shift+Tab into a Shift+BackTab, which should trigger the shortcut
- QTest::newRow("N006a:Shift+Tab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered; //XFAIL
- QTest::newRow("N006a:BackTab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N006a:Shift+Tab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered; //XFAIL
+ QTest::newRow("N006a:BackTab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("N006a:Shift+BackTab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N006a - clear") << ClearAll << NoWidget<< QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ //QTest::newRow("N006a:Shift+BackTab - [BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N006a - clear") << ClearAll << NoWidget<< QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Qt::Key_Tab on Shift + Qt::Key_Backtab
@@ -384,12 +384,12 @@ void tst_QShortcut::number_data()
Qt::Key_Backtab on Shift + Qt::Key_Backtab
Shift + Qt::Key_Backtab on Shift + Qt::Key_Backtab
*/
- QTest::newRow("N006b - slot1") << SetupAccel << TriggerSlot1 << QString("")<< int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N006b:Tab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N006b:Shift+Tab - [Shift+BackTab]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N006b:BackTab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N006b:Shift+BackTab - [Shift+BackTab]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered; //XFAIL
- QTest::newRow("N006b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N006b - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N006b:Tab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N006b:Shift+Tab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Tab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N006b:BackTab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N006b:Shift+BackTab - [Shift+BackTab]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Backtab) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered; //XFAIL
+ QTest::newRow("N006b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
//===========================================
// [Shift + key] and [key] on shortcuts with
@@ -400,11 +400,11 @@ void tst_QShortcut::number_data()
Qt::Key_F1
Shift + Qt::Key_F1
*/
- QTest::newRow("N007 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N007 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N007:F1") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N007:Shift + F1") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N007 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N007 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N007 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N007:F1") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N007:Shift + F1") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N007 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Qt::Key_M
@@ -412,51 +412,51 @@ void tst_QShortcut::number_data()
Ctrl + Qt::Key_M
Alt + Qt::Key_M
*/
- QTest::newRow("N01 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N02 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N03 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::CTRL + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N04 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::ALT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N:Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N:Shift+Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N:Ctrl+Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::CTRL + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N:Alt+Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::ALT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N01 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N02 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N03 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::CTRL + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N04 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::ALT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N:Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N:Shift+Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N:Ctrl+Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::CTRL + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N:Alt+Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::ALT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
/* Testing Single Sequence Ambiguity
Qt::Key_M on shortcut2
*/
- QTest::newRow("N05 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N:Qt::Key_M on slot") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Ambiguous;
- QTest::newRow("N05 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N05 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N:Qt::Key_M on slot") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Ambiguous;
+ QTest::newRow("N05 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Specialkeys
Qt::Key_aring
Qt::Key_Aring
Qt::UNICODE_ACCEL + Qt::Key_K
*/
- QTest::newRow("N06 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N07 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N08 - slot2") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N06 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N07 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N08 - slot2") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N:Qt::Key_aring") << TestAccel << NoWidget << QString("") << int(Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N:Qt::UNICODE_ACCEL + Qt::Key_K") << TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N:Qt::Key_aring") << TestAccel << NoWidget << QString("") << int(Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N:Qt::UNICODE_ACCEL + Qt::Key_K")<< TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Multiple Sequences
Qt::Key_M
Qt::Key_I, Qt::Key_M
Shift+Qt::Key_I, Qt::Key_M
*/
- QTest::newRow("N10 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N11 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::Key_I) << 0 << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("N12 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_I) << 0 << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << NoResult;
-
- QTest::newRow("N:Qt::Key_M (2)") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N:Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_I) << int('i') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("N:Shift+Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_I) << int('I') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("N13 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("N10 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N11 - slot2") << SetupAccel << TriggerSlot2 << QString("") << int(Qt::Key_I) << 0 << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("N12 - slot1") << SetupAccel << TriggerSlot1 << QString("") << int(Qt::SHIFT + Qt::Key_I) << 0 << int(Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << NoResult;
+
+ QTest::newRow("N:Qt::Key_M (2)") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N:Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_I) << int('i') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("N:Shift+Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_I) << int('I') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("N13 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
}
// ------------------------------------------------------------------
@@ -478,15 +478,15 @@ void tst_QShortcut::text_data()
Shift + Qt::Key_Plus on Qt::Key_Pluss
Qt::Key_Plus on Qt::Key_Pluss
*/
- QTest::newRow("T001 - slot1") << SetupAccel << TriggerSlot1 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T001 - slot1") << SetupAccel << TriggerSlot1 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("T001:Shift+M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T001:M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T001 - slot2") << SetupAccel << TriggerSlot2 << QString("+") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ //QTest::newRow("T001:Shift+M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T001:M - [M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T001 - slot2") << SetupAccel << TriggerSlot2 << QString("+") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("T001:Shift++ [+]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T001:+ [+]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T001 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ //QTest::newRow("T001:Shift++ [+]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T001:+ [+]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T001 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Shift + Qt::Key_M on Shift + Qt::Key_M
@@ -496,44 +496,44 @@ void tst_QShortcut::text_data()
Shift + Ctrl + Qt::Key_Plus on Ctrl + Qt::Key_Pluss
Ctrl + Qt::Key_Plus on Ctrl + Qt::Key_Pluss
*/
- QTest::newRow("T002 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T002:Shift+M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T002:M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T002 - slot2") << SetupAccel << TriggerSlot2 << QString("Shift++") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T002:Shift++ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T002:+ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T002 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("T002 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T002:Shift+M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T002:M - [Shift+M]") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T002 - slot2") << SetupAccel << TriggerSlot2 << QString("Shift++") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T002:Shift++ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T002:+ [Shift++]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T002 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Shift + Ctrl + Qt::Key_Plus on Ctrl + Qt::Key_Plus
Ctrl + Qt::Key_Plus on Ctrl + Qt::Key_Plus
- Qt::Key_Plus on Ctrl + Qt::Key_Plus
+ Qt::Key_Plus on Ctrl + Qt::Key_Plus
*/
- QTest::newRow("T002b - slot1") << SetupAccel << TriggerSlot1 << QString("Ctrl++") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T002b - slot1") << SetupAccel << TriggerSlot1 << QString("Ctrl++") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("T002b:Shift+Ctrl++ [Ctrl++]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::CTRL + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T002b:Ctrl++ [Ctrl++]") << TestAccel << NoWidget << QString("") << int(Qt::CTRL + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T002b:+ [Ctrl++]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T002b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ //QTest::newRow("T002b:Shift+Ctrl++ [Ctrl++]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::CTRL + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T002b:Ctrl++ [Ctrl++]") << TestAccel << NoWidget << QString("") << int(Qt::CTRL + Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T002b:+ [Ctrl++]") << TestAccel << NoWidget << QString("") << int(Qt::Key_Plus) << int('+') << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T002b - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Shift + Qt::Key_F1 on Qt::Key_F1
Qt::Key_F1 on Qt::Key_F1
*/
- QTest::newRow("T003 - slot1") << SetupAccel << TriggerSlot1 << QString("F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T003 - slot1") << SetupAccel << TriggerSlot1 << QString("F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
//commented out because the behaviour changed, those tests should be updated
- //QTest::newRow("T003:Shift+F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T003:F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T003 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ //QTest::newRow("T003:Shift+F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T003:F1 - [F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T003 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Shift + Qt::Key_F1 on Shift + Qt::Key_F1
Qt::Key_F1 on Shift + Qt::Key_F1
*/
- QTest::newRow("T004 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T004:Shift+F1 - [Shift+F1]")<< TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("T004 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T004:Shift+F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T004:F1 - [Shift+F1]") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T004 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
//===========================================
// [Shift + key] and [key] on shortcuts with
@@ -544,11 +544,11 @@ void tst_QShortcut::text_data()
Qt::Key_F1
Shift + Qt::Key_F1
*/
- QTest::newRow("T007 - slot1") << SetupAccel << TriggerSlot1 << QString("F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T007 - slot2") << SetupAccel << TriggerSlot2 << QString("Shift+F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T007:F1") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T007:Shift + F1") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T007 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("T007 - slot1") << SetupAccel << TriggerSlot1 << QString("F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T007 - slot2") << SetupAccel << TriggerSlot2 << QString("Shift+F1") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T007:F1") << TestAccel << NoWidget << QString("") << int(Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T007:Shift + F1") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_F1) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T007 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Sequences
Qt::Key_M
@@ -556,22 +556,22 @@ void tst_QShortcut::text_data()
Ctrl + Qt::Key_M
Alt + Qt::Key_M
*/
- QTest::newRow("T01 - slot1") << SetupAccel << TriggerSlot1 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T02 - slot2") << SetupAccel << TriggerSlot2 << QString("Shift+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T03 - slot1") << SetupAccel << TriggerSlot1 << QString("Ctrl+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T04 - slot2") << SetupAccel << TriggerSlot2 << QString("Alt+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T01 - slot1") << SetupAccel << TriggerSlot1 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T02 - slot2") << SetupAccel << TriggerSlot2 << QString("Shift+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T03 - slot1") << SetupAccel << TriggerSlot1 << QString("Ctrl+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T04 - slot2") << SetupAccel << TriggerSlot2 << QString("Alt+M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T:Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T:Shift + Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T:Ctrl + Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::CTRL + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T:Alt + Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::ALT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T:Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T:Shift + Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_M) << int('M') << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T:Ctrl + Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::CTRL + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T:Alt + Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::ALT + Qt::Key_M) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
/* Testing Single Sequence Ambiguity
Qt::Key_M on shortcut2
*/
- QTest::newRow("T05 - slot2") << SetupAccel << TriggerSlot2 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T:Qt::Key_M on TriggerSlot2") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Ambiguous;
- QTest::newRow("T06 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("T05 - slot2") << SetupAccel << TriggerSlot2 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T:Qt::Key_M on TriggerSlot2") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Ambiguous;
+ QTest::newRow("T06 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Single Specialkeys
Qt::Key_aring
@@ -581,26 +581,26 @@ void tst_QShortcut::text_data()
/* see comments above on the #ifdef'ery */
QTest::newRow("T06 - slot1") << SetupAccel << TriggerSlot1 << QString::fromLatin1("\x0C5")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
QTest::newRow("T07 - slot2") << SetupAccel << TriggerSlot2 << QString::fromLatin1("Shift+\x0C5")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T08 - slot2") << SetupAccel << TriggerSlot1 << QString("K") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T:Qt::Key_aring") << TestAccel << NoWidget << QString("") << int(Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T:Qt::UNICODE_ACCEL + Qt::Key_K") << TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("T08 - slot2") << SetupAccel << TriggerSlot1 << QString("K") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T:Qt::Key_aring") << TestAccel << NoWidget << QString("") << int(Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T:Qt::Key_Aring") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+Qt::Key_Aring) << 0 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T:Qt::Key_aring - Text Form") << TestAccel << NoWidget << QString("") << 0 << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T:Qt::Key_Aring - Text Form") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT+0) << 0xC5 << 0 << 0 << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T:Qt::UNICODE_ACCEL + Qt::Key_K")<< TestAccel << NoWidget << QString("") << int(Qt::UNICODE_ACCEL + Qt::Key_K) << int('k') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T09 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
/* Testing Multiple Sequences
Qt::Key_M
Qt::Key_I, Qt::Key_M
Shift+Qt::Key_I, Qt::Key_M
*/
- QTest::newRow("T10 - slot1") << SetupAccel << TriggerSlot1 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T11 - slot2") << SetupAccel << TriggerSlot2 << QString("I, M")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T12 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+I, M")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
- QTest::newRow("T:Qt::Key_M (2)") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T:Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_I) << int('i') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot2Triggered;
- QTest::newRow("T:Shift+Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_I) << int('I') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot1Triggered;
- QTest::newRow("T13 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
+ QTest::newRow("T10 - slot1") << SetupAccel << TriggerSlot1 << QString("M") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T11 - slot2") << SetupAccel << TriggerSlot2 << QString("I, M")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T12 - slot1") << SetupAccel << TriggerSlot1 << QString("Shift+I, M")<< 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult;
+ QTest::newRow("T:Qt::Key_M (2)") << TestAccel << NoWidget << QString("") << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T:Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::Key_I) << int('i') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot2Triggered;
+ QTest::newRow("T:Shift+Qt::Key_I, Qt::Key_M") << TestAccel << NoWidget << QString("") << int(Qt::SHIFT + Qt::Key_I) << int('I') << int(Qt::Key_M) << int('m') << 0 << 0 << 0 << 0 << Slot1Triggered;
+ QTest::newRow("T13 - clear") << ClearAll << NoWidget << QString("") << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << NoResult; // Clear all
}
// ------------------------------------------------------------------
@@ -624,7 +624,7 @@ void tst_QShortcut::disabledItems()
QPushButton pb2(mainW);
pb1.setObjectName("pushbutton-1");
pb2.setObjectName("pushbutton-2");
- pb1.show(); // Must be show for QShortcutMap::correctSubWindow to trigger
+ pb1.show(); // Must be show for QShortcutMap::correctSubWindow to trigger
pb2.show();
QShortcut *cut1 = setupShortcut(&pb1, "shortcut1-pb1", TriggerSlot1, "M");
@@ -700,21 +700,21 @@ void tst_QShortcut::disabledItems()
sendKeyEvents( Qt::CTRL+Qt::Key_Q, 0 );
QCOMPARE( currentResult, NoResult );
if (over_330)
- QCOMPARE( sbText, QString("Ctrl+K, Ctrl+Q not defined") );
+ QCOMPARE( sbText, QString("Ctrl+K, Ctrl+Q not defined") );
currentResult = NoResult;
sendKeyEvents( Qt::CTRL+Qt::Key_K, 0 );
sendKeyEvents( Qt::CTRL+Qt::Key_M, 0 );
QCOMPARE( currentResult, NoResult );
if (over_330)
- QCOMPARE( sbText, QString::null );
+ QCOMPARE( sbText, QString::null );
currentResult = NoResult;
sendKeyEvents( Qt::CTRL+Qt::Key_K, 0 );
sendKeyEvents( Qt::CTRL+Qt::Key_L, 0 );
QCOMPARE( currentResult, Slot1Triggered );
if (over_330)
- QCOMPARE( sbText, QString::null );
+ QCOMPARE( sbText, QString::null );
#endif
clearAllShortcuts();
cut1 = 0;
@@ -876,7 +876,7 @@ void tst_QShortcut::ambiguousItems()
QPushButton pb2(mainW);
pb1.setObjectName("pushbutton-1");
pb2.setObjectName("pushbutton-2");
- pb1.show(); // Must be show for QShortcutMap::correctSubWindow to trigger
+ pb1.show(); // Must be show for QShortcutMap::correctSubWindow to trigger
pb2.show();
setupShortcut(&pb1, "shortcut1-pb1", TriggerSlot1, "M");
@@ -915,7 +915,7 @@ void tst_QShortcut::unicodeCompare()
QPushButton pb2(mainW);
pb1.setObjectName("pushbutton-1");
pb2.setObjectName("pushbutton-2");
- pb1.show(); // Must be show for QShortcutMap::correctSubWindow to trigger
+ pb1.show(); // Must be show for QShortcutMap::correctSubWindow to trigger
pb2.show();
QKeySequence ks1("Ctrl+M"); // Unicode
@@ -1190,25 +1190,25 @@ void tst_QShortcut::sendKeyEvents(QWidget *w, int k1, QChar c1, int k2, QChar c2
if (k1 || c1.toLatin1()) {
QString c(c1.unicode() == QChar::Null ? QString() : QString(c1));
QTest::sendKeyEvent(QTest::Press, w, static_cast<Qt::Key>(k1), c, b1);
- QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k1), c, b1);
+ QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k1), c, b1);
}
if (k2 || c2.toLatin1()) {
QString c(c2.unicode() == QChar::Null ? QString() : QString(c2));
- QTest::sendKeyEvent(QTest::Press, w, static_cast<Qt::Key>(k2), c, b2);
- QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k2), c, b2);
+ QTest::sendKeyEvent(QTest::Press, w, static_cast<Qt::Key>(k2), c, b2);
+ QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k2), c, b2);
}
if (k3 || c3.toLatin1()) {
QString c(c3.unicode() == QChar::Null ? QString() : QString(c3));
- QTest::sendKeyEvent(QTest::Press, w, static_cast<Qt::Key>(k3), c, b3);
- QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k3), c, b3);
+ QTest::sendKeyEvent(QTest::Press, w, static_cast<Qt::Key>(k3), c, b3);
+ QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k3), c, b3);
}
if (k4 || c4.toLatin1()) {
QString c(c4.unicode() == QChar::Null ? QString() : QString(c4));
- QTest::sendKeyEvent(QTest::Press, w, static_cast<Qt::Key>(k4), c, b4);
- QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k4), c, b4);
+ QTest::sendKeyEvent(QTest::Press, w, static_cast<Qt::Key>(k4), c, b4);
+ QTest::sendKeyEvent(QTest::Release, w, static_cast<Qt::Key>(k4), c, b4);
}
}
@@ -1229,9 +1229,9 @@ void tst_QShortcut::testElement()
QFETCH(tst_QShortcut::Result, result);
if (action == ClearAll) {
- clearAllShortcuts();
+ clearAllShortcuts();
} else if (action == SetupAccel) {
- setupShortcut(testWidget, txt, k1, k2, k3, k4);
+ setupShortcut(testWidget, txt, k1, k2, k3, k4);
} else {
sendKeyEvents(k1, c1, k2, c2, k3, c3, k4, c4);
QCOMPARE(currentResult, result);
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index fc3b0d983c..38b629cad7 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -669,7 +669,7 @@ void tst_QWidget::cleanup()
// Helper class...
BezierViewer::BezierViewer( QWidget* parent)
- : QWidget( parent )
+ : QWidget(parent)
{
setObjectName(QLatin1String("TestWidget"));
setWindowTitle(objectName());
@@ -689,9 +689,9 @@ void BezierViewer::paintEvent( QPaintEvent* )
{
if ( points.size() != 4 ) {
#if defined(QT_CHECK_RANGE)
- qWarning( "QPolygon::bezier: The array must have 4 control points" );
+ qWarning( "QPolygon::bezier: The array must have 4 control points" );
#endif
- return;
+ return;
}
/* Calculate Bezier curve */
@@ -707,18 +707,18 @@ void BezierViewer::paintEvent( QPaintEvent* )
/* Scale Bezier curve vertices */
for ( QPolygonF::Iterator it = bezier.begin(); it != bezier.end(); ++it ) {
- it->setX( (it->x()-br.x()) * scl + border );
- it->setY( (it->y()-br.y()) * scl + border );
+ it->setX( (it->x()-br.x()) * scl + border );
+ it->setY( (it->y()-br.y()) * scl + border );
}
/* Draw grid */
painter.setPen( Qt::lightGray );
- int i;
- for ( i = border; i <= pr.width(); i += scl ) {
- painter.drawLine( i, 0, i, pr.height() );
+ int i;
+ for ( i = border; i <= pr.width(); i += scl ) {
+ painter.drawLine( i, 0, i, pr.height() );
}
for ( int j = border; j <= pr.height(); j += scl ) {
- painter.drawLine( 0, j, pr.width(), j );
+ painter.drawLine( 0, j, pr.width(), j );
}
/* Write number of vertices */
@@ -736,17 +736,17 @@ void BezierViewer::paintEvent( QPaintEvent* )
/* Scale and draw control points */
painter.setPen( Qt::darkGreen );
for ( QPolygonF::Iterator p1 = points.begin(); p1 != points.end(); ++p1 ) {
- int x = (p1->x()-br.x()) * scl + border;
- int y = (p1->y()-br.y()) * scl + border;
- painter.drawLine( x-4, y-4, x+4, y+4 );
- painter.drawLine( x+4, y-4, x-4, y+4 );
+ int x = (p1->x()-br.x()) * scl + border;
+ int y = (p1->y()-br.y()) * scl + border;
+ painter.drawLine( x-4, y-4, x+4, y+4 );
+ painter.drawLine( x+4, y-4, x-4, y+4 );
}
/* Draw vertices */
painter.setPen( Qt::red );
painter.setBrush( Qt::red );
for ( QPolygonF::Iterator p2 = bezier.begin(); p2 != bezier.end(); ++p2 )
- painter.drawEllipse( p2->x()-1, p2->y()-1, 3, 3 );
+ painter.drawEllipse( p2->x()-1, p2->y()-1, 3, 3 );
}
void tst_QWidget::fontPropagation()
@@ -1677,17 +1677,17 @@ public:
Container()
{
box = new QVBoxLayout(this);
- //(new QVBoxLayout(this))->setAutoAdd(true);
+ //(new QVBoxLayout(this))->setAutoAdd(true);
}
void tab()
{
- focusNextPrevChild(true);
+ focusNextPrevChild(true);
}
void backTab()
{
- focusNextPrevChild(false);
+ focusNextPrevChild(false);
}
};
@@ -1712,7 +1712,7 @@ public:
setFocusProxy( lineEdit );
setFocusPolicy( Qt::StrongFocus );
- setTabOrder(lineEdit, button);
+ setTabOrder(lineEdit, button);
}
private:
@@ -1761,9 +1761,9 @@ void tst_QWidget::setTabOrder()
QTRY_VERIFY(lastEdit->hasFocus());
container.tab();
do {
- QVERIFY(comp[current]->focusProxy()->hasFocus());
- container.tab();
- current--;
+ QVERIFY(comp[current]->focusProxy()->hasFocus());
+ container.tab();
+ current--;
} while (current >= 0);
QVERIFY(firstEdit->hasFocus());
diff --git a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
index 93262722b9..523fac940d 100644
--- a/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/widgets/widgets/qabstractbutton/tst_qabstractbutton.cpp
@@ -419,7 +419,7 @@ void tst_QAbstractButton::setIcon()
QPixmap p2( test2_xpm );
for ( int a = 0; a<5; a++ )
- testWidget->setIcon( p2 );
+ testWidget->setIcon( p2 );
QCOMPARE( testWidget->icon().pixmap(12, 8), p2 );
diff --git a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
index 14a8496b42..a3079cdaef 100644
--- a/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
+++ b/tests/auto/widgets/widgets/qcalendarwidget/tst_qcalendarwidget.cpp
@@ -185,7 +185,7 @@ void tst_QCalendarWidget::buttonClickCheck()
int month = object.monthShown();
QToolButton *button = object.findChild<QToolButton *>("qt_calendar_prevmonth");
QTest::mouseClick(button, Qt::LeftButton);
- QCOMPARE(month > 1 ? month-1 : 12, object.monthShown());
+ QCOMPARE(month > 1 ? month-1 : 12, object.monthShown());
button = object.findChild<QToolButton *>("qt_calendar_nextmonth");
QTest::mouseClick(button, Qt::LeftButton);
QCOMPARE(month, object.monthShown());
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index a4ad18c7a6..6551a88232 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
@@ -87,7 +87,7 @@ private slots:
void task248604_infiniteResize();
void task258459_visibilityChanged();
void taskQTBUG_1665_closableChanged();
- void taskQTBUG_9758_undockedGeometry();
+ void taskQTBUG_9758_undockedGeometry();
};
// Testing get/set functions
@@ -588,7 +588,7 @@ void tst_QDockWidget::visibilityChanged()
QCOMPARE(spy.count(), 0);
mw.addDockWidget(Qt::RightDockWidgetArea, &dw2);
- QTest::qWait(200);
+ QTest::qWait(200);
QCOMPARE(spy.count(), 1);
QCOMPARE(spy.at(0).at(0).toBool(), true);
}
@@ -758,19 +758,19 @@ void tst_QDockWidget::task169808_setFloating()
}
};
QMainWindow mw;
- mw.setCentralWidget(new MyWidget);
- QDockWidget *dw = new QDockWidget("my dock");
- dw->setWidget(new MyWidget);
- mw.addDockWidget(Qt::LeftDockWidgetArea, dw);
- dw->setFloating(true);
- mw.show();
+ mw.setCentralWidget(new MyWidget);
+ QDockWidget *dw = new QDockWidget("my dock");
+ dw->setWidget(new MyWidget);
+ mw.addDockWidget(Qt::LeftDockWidgetArea, dw);
+ dw->setFloating(true);
+ mw.show();
QVERIFY(QTest::qWaitForWindowExposed(&mw));
QCOMPARE(dw->widget()->size(), dw->widget()->sizeHint());
//and now we try to test if the contents margin is taken into account
dw->widget()->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- dw->setFloating(false);
+ dw->setFloating(false);
QVERIFY(QTest::qWaitForWindowExposed(&mw));
qApp->processEvents(); //leave time processing events
diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
index 49f058862d..6784ee477b 100644
--- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -640,7 +640,7 @@ void tst_QDoubleSpinBox::setDecimals()
QTest::keyClick(&spin, Qt::Key_1);
QTest::keyClick(&spin, Qt::Key_1);
QTest::keyClick(&spin, Qt::Key_1);
- if (sizeof(qreal) == sizeof(float))
+ if (sizeof(qreal) == sizeof(float))
QCOMPARE(spin.text().left(17), expected.left(17));
else
QCOMPARE(spin.text(), expected);
diff --git a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
index 2fd15b891a..e3aa7fda51 100644
--- a/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
+++ b/tests/auto/widgets/widgets/qlabel/tst_qlabel.cpp
@@ -189,9 +189,9 @@ void tst_QLabel::init()
void tst_QLabel::cleanup()
{
if (QTest::currentTestFunction() == QLatin1String("setBuddy")) {
- testWidget->show();
+ testWidget->show();
- delete test_box; // this should delete tst_labl and test_edit as well.
+ delete test_box; // this should delete tst_labl and test_edit as well.
}
}
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
index e9cc1e6abd..45167bac60 100644
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
@@ -1468,7 +1468,7 @@ void tst_QLineEdit::undo_keypressevents()
void tst_QLineEdit::QTBUG5786_undoPaste()
{
if (!PlatformClipboard::isAvailable())
- QSKIP("this machine doesn't support the clipboard");
+ QSKIP("this machine doesn't support the clipboard");
QString initial("initial");
QString string("test");
QString additional("add");
diff --git a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
index e5a9b570bb..d02b86bd8a 100644
--- a/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/widgets/widgets/qmainwindow/tst_qmainwindow.cpp
@@ -1340,8 +1340,8 @@ void tst_QMainWindow::restoreStateFromPreviousVersion()
QCOMPARE(win.restoreState(ba), true);
for( int i = 0; i < docks.size(); ++i) {
- QCOMPARE( win.dockWidgetArea(docks[i]), Qt::DockWidgetArea(1 << i%4));
- }
+ QCOMPARE( win.dockWidgetArea(docks[i]), Qt::DockWidgetArea(1 << i%4));
+ }
}
}
@@ -1426,7 +1426,7 @@ public:
QSize sizeHint() const
{
- return QSize(200, 200);
+ return QSize(200, 200);
}
};
diff --git a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
index 2b8e735a0e..2e492f3a5c 100644
--- a/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
+++ b/tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
@@ -173,22 +173,22 @@ const int RESET = 0;
/*!
Test plan:
insertItem (all flavors and combinations)
- removing menu items
- clearing the menu
-
- check the common behaviour + emitted signals for:
- accelerator keys
- navigating tru the menu and then pressing ENTER
- mouse clicks
- mouse drags
- combinations of key + mouse (if possible)
- checked / unckecked state of menu options
- active / inactive state
+ removing menu items
+ clearing the menu
+
+ check the common behaviour + emitted signals for:
+ accelerator keys
+ navigating tru the menu and then pressing ENTER
+ mouse clicks
+ mouse drags
+ combinations of key + mouse (if possible)
+ checked / unckecked state of menu options
+ active / inactive state
Can't test these without pixmap comparison...
- show and hide
- icons in a menu
- pixmaps in a menu
+ show and hide
+ icons in a menu
+ pixmaps in a menu
*/
@@ -481,17 +481,17 @@ void tst_QMenuBar::removeItemAt()
switch (removeIndex )
{
case 0:
- QCOMPARE( menuBarActions2.at(0)->text(), QString("Menu 2") );
- QCOMPARE( menuBarActions2.at(1)->text(), QString("Menu 3") );
- break;
+ QCOMPARE( menuBarActions2.at(0)->text(), QString("Menu 2") );
+ QCOMPARE( menuBarActions2.at(1)->text(), QString("Menu 3") );
+ break;
case 1:
- QCOMPARE( menuBarActions2.at(0)->text(), QString("Menu 1") );
- QCOMPARE( menuBarActions2.at(1)->text(), QString("Menu 3") );
- break;
+ QCOMPARE( menuBarActions2.at(0)->text(), QString("Menu 1") );
+ QCOMPARE( menuBarActions2.at(1)->text(), QString("Menu 3") );
+ break;
case 2:
- QCOMPARE( menuBarActions2.at(0)->text(), QString("Menu 1") );
- QCOMPARE( menuBarActions2.at(1)->text(), QString("Menu 2") );
- break;
+ QCOMPARE( menuBarActions2.at(0)->text(), QString("Menu 1") );
+ QCOMPARE( menuBarActions2.at(1)->text(), QString("Menu 2") );
+ break;
}
QVERIFY( menuBarActions2.size() == 2 );
@@ -827,7 +827,7 @@ void tst_QMenuBar::check_escKey()
// void tst_QMenuBar::check_mouse1()
// {
// if (QSystem::curStyle() == "Motif")
-// QSKIP("This fails in Motif due to a bug in the testing framework");
+// QSKIP("This fails in Motif due to a bug in the testing framework");
// QFETCH( QString, popup_item );
// QFETCH( int, itemA_count );
// QFETCH( int, itemB_count );
@@ -888,7 +888,7 @@ void tst_QMenuBar::check_escKey()
// void tst_QMenuBar::check_mouse2()
// {
// if (QSystem::curStyle() == "Motif")
-// QSKIP("This fails in Motif due to a bug in the testing framework");
+// QSKIP("This fails in Motif due to a bug in the testing framework");
// QFETCH( QString, label );
// QFETCH( int, itemA_count );
// QFETCH( int, itemB_count );
@@ -961,8 +961,8 @@ void tst_QMenuBar::allowActiveAndDisabled()
void tst_QMenuBar::check_altPress()
{
if ( !qApp->style()->styleHint(QStyle::SH_MenuBar_AltKeyNavigation) ) {
- QSKIP( QString( "this is not supposed to work in the %1 style. Skipping." ).
- arg( qApp->style()->objectName() ).toLatin1());
+ QSKIP(QString( "this is not supposed to work in the %1 style. Skipping." ).
+ arg(qApp->style()->objectName()).toLatin1());
}
QMainWindow w;
@@ -1141,7 +1141,7 @@ void tst_QMenuBar::task223138_triggered()
void tst_QMenuBar::task256322_highlight()
{
QMainWindow win;
- win.menuBar()->setNativeMenuBar(false); //we can't check the geometry of native menubars
+ win.menuBar()->setNativeMenuBar(false); //we can't check the geometry of native menubars
QMenu menu;
QAction *file = win.menuBar()->addMenu(&menu);
file->setText("file");
diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
index d336d00b3e..1eccdd768b 100644
--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp
@@ -490,8 +490,8 @@ void tst_QPushButton::defaultAndAutoDefault()
// Adding buttons to QDialog through a layout
QDialog dialog;
- QPushButton button3;
- button3.setAutoDefault(false);
+ QPushButton button3;
+ button3.setAutoDefault(false);
QPushButton button1;
QVERIFY(!button1.autoDefault());
@@ -512,7 +512,7 @@ void tst_QPushButton::defaultAndAutoDefault()
layout.addWidget(&button2, 0, 2);
layout.addWidget(&button1, 0, 1);
dialog.setLayout(&layout);
- button3.setFocus();
+ button3.setFocus();
QVERIFY(button1.autoDefault());
QVERIFY(button1.isDefault());
QVERIFY(button2.autoDefault());
diff --git a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
index a00db02c0a..13d958c8ca 100644
--- a/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
+++ b/tests/auto/widgets/widgets/qtoolbox/tst_qtoolbox.cpp
@@ -252,9 +252,9 @@ void tst_QToolBox::change()
QVERIFY( lastItem );
for ( int c = 0; c < testWidget->count(); ++c ) {
- QString label = "Item " + QString::number(c);
- testWidget->setItemText(c, label);
- QCOMPARE( testWidget->itemText(c), label );
+ QString label = "Item " + QString::number(c);
+ testWidget->setItemText(c, label);
+ QCOMPARE( testWidget->itemText(c), label );
}
testWidget->setCurrentIndex( 0 );