Commit be5aa77a authored by Volker Krause's avatar Volker Krause

Compile without KDELibs4Support

There's still some obsolete Qt code in here though that needs porting.
parent 8d0b91d3
......@@ -86,6 +86,7 @@ if (NOT ${MIMETREEPARSER_ONLY_BUILD})
find_package(KF5WindowSystem ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5XmlGui ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5SyntaxHighlighting ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(Grantlee5 "5.1" CONFIG REQUIRED)
......@@ -130,6 +131,7 @@ if(EXISTS "${Messagelib_SOURCE_DIR}/.git")
endif ()
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x000000)
if(BUILD_TESTING)
add_definitions(-DBUILD_TESTING)
......
......@@ -75,6 +75,6 @@ add_messagecomposer_cryptotest( signencrypttest.cpp )
set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
add_akonadi_isolated_test_advanced( followupreminderselectdatedialogtest.cpp "../src/followupreminder/followupreminderselectdatedialog.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer")
add_akonadi_isolated_test_advanced( followupreminderselectdatedialogtest.cpp "../src/followupreminder/followupreminderselectdatedialog.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::I18n")
add_akonadi_isolated_test_advanced( attachmentvcardfromaddressbookjobtest.cpp "../src/job/attachmentvcardfromaddressbookjob.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::Contacts;KF5::AkonadiContact")
add_akonadi_isolated_test_advanced( attachmentvcardfromaddressbookjobtest.cpp "../src/job/attachmentvcardfromaddressbookjob.cpp" "KF5::CalendarCore;KF5::AkonadiCore;KF5::AkonadiWidgets;KF5::MessageComposer;KF5::Contacts;KF5::AkonadiContact;KF5::I18n")
......@@ -686,6 +686,7 @@ StorageModel *Model::storageModel() const
void ModelPrivate::clear()
{
q->beginResetModel();
if (mFillStepTimer.isActive()) {
mFillStepTimer.stop();
}
......@@ -721,7 +722,7 @@ void ModelPrivate::clear()
mRootItem->killAllChildItems();
q->reset();
q->endResetModel();
//Q_EMIT headerDataChanged();
mView->selectionModel()->clearSelection();
......
......@@ -106,8 +106,8 @@ View::View(Widget *pParent)
connect(header(), &QHeaderView::sectionResized,
this, &View::slotHeaderSectionResized);
header()->setClickable(true);
header()->setResizeMode(QHeaderView::Interactive);
header()->setSectionsClickable(true);
header()->setSectionResizeMode(QHeaderView::Interactive);
header()->setMinimumSectionSize(2); // QTreeView overrides our sections sizes if we set them smaller than this value
header()->setDefaultSectionSize(2); // QTreeView overrides our sections sizes if we set them smaller than this value
......
......@@ -489,7 +489,8 @@ Collection StorageModel::parentCollectionForRow(int row) const
void StorageModel::resetModelStorage()
{
reset();
beginResetModel();
endResetModel();
}
#include "moc_storagemodel.cpp"
......@@ -274,7 +274,7 @@ ThemePreviewWidget::ThemePreviewWidget(QWidget *parent)
m->setText(0, QString());
mGroupHeaderSampleItem->setExpanded(true);
header()->setMovable(false);
header()->setSectionsMovable(false);
}
void ThemePreviewWidget::changeEvent(QEvent *event)
......
......@@ -27,7 +27,7 @@ macro(add_messageviewer_mailsourceviewbrowserwidget_unittest _source)
ecm_add_test(${_source} ../src/widgets/mailsourceviewtextbrowserwidget.cpp ../src/findbar/findbarsourceview.cpp
TEST_NAME ${_name}
NAME_PREFIX "messageviewer-"
LINK_LIBRARIES Qt5::Test Qt5::Gui Qt5::Widgets KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::CalendarCore KF5::PimTextEdit KF5::PimCommon KF5::MessageViewer KF5::WebEngineViewer KF5::SyntaxHighlighting
LINK_LIBRARIES Qt5::Test Qt5::Gui Qt5::Widgets KF5::KIOCore KF5::Mime KF5::AkonadiCore KF5::CalendarCore KF5::PimTextEdit KF5::PimCommon KF5::MessageViewer KF5::WebEngineViewer KF5::SyntaxHighlighting KF5::I18n KF5::IconThemes
)
endmacro ()
......
......@@ -24,7 +24,11 @@ include(CheckIncludeFiles)
find_package(Inotify)
set_package_properties(Inotify PROPERTIES
PURPOSE "Filesystem alteration notifications using inotify")
macro_bool_to_01(Inotify_FOUND HAVE_SYS_INOTIFY_H)
if(Inotify_FOUND)
set(HAVE_SYS_INOTIFY_H 1)
else()
set(HAVE_SYS_INOTIFY_H 0)
endif()
configure_file(config-messageviewer.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-messageviewer.h)
# target_include_directories does not handle empty include paths
......
......@@ -141,7 +141,7 @@ QString HeaderStyleUtil::drawSpamMeter(SpamError spamError, double percent, doub
static const int meterWidth = 20;
static const int meterHeight = 5;
QImage meterBar(meterWidth, 1, QImage::Format_Indexed8 /*QImage::Format_RGB32*/);
meterBar.setNumColors(24);
meterBar.setColorCount(24);
meterBar.setColor(meterWidth + 1, qRgb(255, 255, 255));
meterBar.setColor(meterWidth + 2, qRgb(170, 170, 170));
......
......@@ -39,7 +39,7 @@ MimePartTreeView::MimePartTreeView(QWidget *parent)
setSelectionBehavior(QAbstractItemView::SelectRows);
connect(this, &MimePartTreeView::destroyed, this, &MimePartTreeView::slotMimePartDestroyed);
setContextMenuPolicy(Qt::CustomContextMenu);
header()->setResizeMode(QHeaderView::ResizeToContents);
header()->setSectionResizeMode(QHeaderView::ResizeToContents);
connect(mMimePartModel, &MimeTreeModel::modelReset, this, &MimePartTreeView::expandAll);
restoreMimePartTreeConfig();
setDragEnabled(true);
......
......@@ -153,10 +153,9 @@ MimeTreeModel::~MimeTreeModel()
void MimeTreeModel::setRoot(KMime::Content *root)
{
if (d->root != root) {
beginResetModel();
d->clearTempDir();
d->root = root;
beginResetModel();
reset();
endResetModel();
}
}
......
......@@ -18,7 +18,7 @@ set(testmailwebengine_test_SRCS
add_executable(testmailwebengine ${testmailwebengine_test_SRCS})
target_link_libraries(testmailwebengine
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::MessageViewer Qt5::PrintSupport
Qt5::Widgets KF5::WebEngineViewer Qt5::WebEngine Qt5::WebEngineWidgets KF5::XmlGui KF5::IconThemes KF5::MessageViewer Qt5::PrintSupport KF5::I18n
)
#####
......
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