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