Commit 2b5436ca authored by Laurent Montel's avatar Laurent Montel 😁

Remove deprecated method

parent 18ca7966
......@@ -129,7 +129,7 @@ configure_file(korganizer-version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/korganizer
add_definitions( -DQT_NO_CAST_FROM_ASCII )
add_definitions( -DQT_NO_CAST_TO_ASCII )
add_definitions( -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT )
add_definitions( -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 )
add_subdirectory(src)
add_subdirectory(korgac)
......
......@@ -100,9 +100,9 @@ void KoEventPopupMenuTest::createEventFromTodo()
menu.showIncidencePopup(item, QDate());
QAction *createevent = menu.findChild<QAction *>(QStringLiteral("createevent"));
createevent->trigger();
IncidenceEditorNG::IncidenceDialog *dlg = qFindChild<IncidenceEditorNG::IncidenceDialog *>(&menu);
IncidenceEditorNG::IncidenceDialog *dlg = menu.findChild<IncidenceEditorNG::IncidenceDialog *>();
QVERIFY(dlg);
IncidenceEditorNG::IncidenceEditor *editor = qFindChild<IncidenceEditorNG::IncidenceEditor *>(&menu);
IncidenceEditorNG::IncidenceEditor *editor = menu.findChild<IncidenceEditorNG::IncidenceEditor *>();
QVERIFY(editor);
KCalCore::Event::Ptr event(editor->incidence<KCalCore::Event>());
QVERIFY(event->uid() != todo->uid());
......@@ -134,9 +134,9 @@ void KoEventPopupMenuTest::createTodoFromEvent()
menu.showIncidencePopup(item, QDate());
QAction *createtodo = menu.findChild<QAction *>(QStringLiteral("createtodo"));
createtodo->trigger();
IncidenceEditorNG::IncidenceDialog *dlg = qFindChild<IncidenceEditorNG::IncidenceDialog *>(&menu);
IncidenceEditorNG::IncidenceDialog *dlg = menu.findChild<IncidenceEditorNG::IncidenceDialog *>();
QVERIFY(dlg);
IncidenceEditorNG::IncidenceEditor *editor = qFindChild<IncidenceEditorNG::IncidenceEditor *>(&menu);
IncidenceEditorNG::IncidenceEditor *editor = menu.findChild<IncidenceEditorNG::IncidenceEditor *>();
QVERIFY(editor);
KCalCore::Todo::Ptr todo(editor->incidence<KCalCore::Todo>());
QVERIFY(todo->uid() != event->uid());
......@@ -169,10 +169,10 @@ void KoEventPopupMenuTest::createNoteFromEvent()
menu.setCalendar(calendar);
menu.showIncidencePopup(item, QDate());
QAction *createnote = menu.findChild<QAction *>(QStringLiteral("createnote"));
NoteEditDialog *noteedit = qFindChild<NoteEditDialog *>(&menu);
NoteEditDialog *noteedit = menu.findChild<NoteEditDialog *>();
QVERIFY(!noteedit);
createnote->trigger();
noteedit = qFindChild<NoteEditDialog *>(&menu);
noteedit = menu.findChild<NoteEditDialog *>();
QVERIFY(noteedit);
Akonadi::NoteUtils::NoteMessageWrapper note(noteedit->note());
QCOMPARE(note.title(), summary);
......@@ -208,10 +208,10 @@ void KoEventPopupMenuTest::createNoteFromTodo()
menu.showIncidencePopup(item, QDate());
QAction *createnote = menu.findChild<QAction *>(QStringLiteral("createnote"));
NoteEditDialog *noteedit = qFindChild<NoteEditDialog *>(&menu);
NoteEditDialog *noteedit = menu.findChild<NoteEditDialog *>();
QVERIFY(!noteedit);
createnote->trigger();
noteedit = qFindChild<NoteEditDialog *>(&menu);
noteedit = menu.findChild<NoteEditDialog *>();
QVERIFY(noteedit);
Akonadi::NoteUtils::NoteMessageWrapper note(noteedit->note());
QCOMPARE(note.title(), summary);
......
......@@ -310,7 +310,7 @@ void KCMDesignerFields::initGUI()
mPageView->setHeaderLabel(i18n("Available Pages"));
mPageView->setRootIsDecorated(true);
mPageView->setAllColumnsShowFocus(true);
mPageView->header()->setResizeMode(QHeaderView::Stretch);
mPageView->header()->setSectionResizeMode(QHeaderView::Stretch);
hbox->addWidget(mPageView);
QGroupBox *box = new QGroupBox(i18n("Preview of Selected Page"), this);
......
......@@ -435,27 +435,27 @@ void ModelTest::data()
// General Purpose roles that should return a QString
QVariant variant = model->data(model->index(0, 0), Qt::ToolTipRole);
if (variant.isValid()) {
Q_ASSERT(qVariantCanConvert<QString> (variant));
Q_ASSERT(variant.canConvert<QString>());
}
variant = model->data(model->index(0, 0), Qt::StatusTipRole);
if (variant.isValid()) {
Q_ASSERT(qVariantCanConvert<QString> (variant));
Q_ASSERT(variant.canConvert<QString>());
}
variant = model->data(model->index(0, 0), Qt::WhatsThisRole);
if (variant.isValid()) {
Q_ASSERT(qVariantCanConvert<QString> (variant));
Q_ASSERT(variant.canConvert<QString>());
}
// General Purpose roles that should return a QSize
variant = model->data(model->index(0, 0), Qt::SizeHintRole);
if (variant.isValid()) {
Q_ASSERT(qVariantCanConvert<QSize> (variant));
Q_ASSERT(variant.canConvert<QSize>());
}
// General Purpose roles that should return a QFont
QVariant fontVariant = model->data(model->index(0, 0), Qt::FontRole);
if (fontVariant.isValid()) {
Q_ASSERT(qVariantCanConvert<QFont> (fontVariant));
Q_ASSERT(variant.canConvert<QFont>());
}
// Check that the alignment is one we know about
......@@ -469,12 +469,12 @@ void ModelTest::data()
// General Purpose roles that should return a QColor
QVariant colorVariant = model->data(model->index(0, 0), Qt::BackgroundColorRole);
if (colorVariant.isValid()) {
Q_ASSERT(qVariantCanConvert<QColor> (colorVariant));
Q_ASSERT(colorVariant.canConvert<QColor>());
}
colorVariant = model->data(model->index(0, 0), Qt::TextColorRole);
if (colorVariant.isValid()) {
Q_ASSERT(qVariantCanConvert<QColor> (colorVariant));
Q_ASSERT(colorVariant.canConvert<QColor>());
}
// Check that the "check state" is one we know about.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment