*/
class KItemListControllerTestStyle : public QProxyStyle
{
+ Q_OBJECT
public:
KItemListControllerTestStyle(QStyle* style) :
QProxyStyle(style),
int styleHint(StyleHint hint,
const QStyleOption* option = nullptr,
const QWidget* widget = nullptr,
- QStyleHintReturn* returnData = nullptr) const Q_DECL_OVERRIDE
+ QStyleHintReturn* returnData = nullptr) const override
{
switch (hint) {
case QStyle::SH_ItemView_ActivateItemOnSingleClick:
bool m_activateItemOnSingleClick;
};
-Q_DECLARE_METATYPE(KFileItemListView::ItemLayout);
-Q_DECLARE_METATYPE(Qt::Orientation);
-Q_DECLARE_METATYPE(KItemListController::SelectionBehavior);
-Q_DECLARE_METATYPE(KItemSet);
+Q_DECLARE_METATYPE(KFileItemListView::ItemLayout)
+Q_DECLARE_METATYPE(Qt::Orientation)
+Q_DECLARE_METATYPE(KItemListController::SelectionBehavior)
+Q_DECLARE_METATYPE(KItemSet)
class KItemListControllerTest : public QObject
{
QVERIFY(spyDirectoryLoadingCompleted.wait());
m_container->show();
- QTest::qWaitForWindowShown(m_container);
+ QTest::qWaitForWindowExposed(m_container);
}
void KItemListControllerTest::cleanupTestCase()
{
delete m_container;
- m_container = 0;
+ m_container = nullptr;
delete m_testDir;
- m_testDir = 0;
+ m_testDir = nullptr;
}
/** Before each test, the current item, selection, and item size are reset to the defaults. */
// We have to define a typedef for the pair in order to make the test compile.
typedef QPair<KeyPress, ViewState> keyPressViewStatePair;
-Q_DECLARE_METATYPE(QList<keyPressViewStatePair>);
+Q_DECLARE_METATYPE(QList<keyPressViewStatePair>)
/**
* This function provides the data for the actual test function
selectionBehaviorNames[selectionBehavior] + ", " +
groupingEnabledNames[groupingEnabled];
- const QByteArray testNameAscii = testName.toAscii();
+ const QByteArray testNameAscii = testName.toLatin1();
QTest::newRow(testNameAscii.data())
<< layout