diff --git a/src/chatdocumenthandler.cpp b/src/chatdocumenthandler.cpp index c6a8dbddd..b6d328d40 100644 --- a/src/chatdocumenthandler.cpp +++ b/src/chatdocumenthandler.cpp @@ -134,7 +134,7 @@ int ChatDocumentHandler::completionStartIndex() const return 0; } -#if !defined(Q_OS_ANDROID) && QT_VERSION > QT_VERSION_CHECK(6, 0, 0) +#if !defined(Q_OS_ANDROID) const long long cursor = cursorPosition(); #else const auto cursor = cursorPosition(); diff --git a/src/controller.cpp b/src/controller.cpp index e393547fb..c5bd7ba0e 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -4,11 +4,7 @@ #include "controller.h" -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -#include -#else #include -#endif #include #include diff --git a/src/main.cpp b/src/main.cpp index 0005d910e..28f1b5c9e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -140,19 +140,13 @@ Q_DECL_EXPORT #endif int main(int argc, char *argv[]) { -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -#endif - QNetworkProxyFactory::setUseSystemConfiguration(true); #ifdef HAVE_WEBVIEW QtWebView::initialize(); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); #endif -#endif #ifdef Q_OS_ANDROID QGuiApplication app(argc, argv); @@ -311,10 +305,6 @@ int main(int argc, char *argv[]) return engine->toScriptValue(LocationHelper()); }); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - qRegisterMetaTypeStreamOperators(); -#endif - QQmlApplicationEngine engine; #ifdef HAVE_KDBUSADDONS diff --git a/src/models/completionproxymodel.cpp b/src/models/completionproxymodel.cpp index 49fc46a14..4dacd1a12 100644 --- a/src/models/completionproxymodel.cpp +++ b/src/models/completionproxymodel.cpp @@ -22,11 +22,7 @@ bool CompletionProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &so && sourceModel() ->data(sourceModel()->index(sourceRow, 0), secondaryFilterRole()) .toString() -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) .startsWith(QStringView(m_filterText).sliced(1), Qt::CaseInsensitive)); -#else - .startsWith(m_filterText.midRef(1), Qt::CaseInsensitive)); -#endif } bool CompletionProxyModel::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const diff --git a/src/neochatconnection.cpp b/src/neochatconnection.cpp index d76313652..e98871677 100644 --- a/src/neochatconnection.cpp +++ b/src/neochatconnection.cpp @@ -10,11 +10,7 @@ #include "jobs/neochatdeactivateaccountjob.h" #include "roommanager.h" -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -#include -#else #include -#endif #include diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp index 53526126e..2fd79fc30 100644 --- a/src/neochatroom.cpp +++ b/src/neochatroom.cpp @@ -178,17 +178,9 @@ QCoro::Task NeoChatRoom::doUploadFile(QUrl url, QString body) content = new EventContent::AudioContent(url, fileInfo.size(), mime, fileInfo.fileName()); } else if (mime.name().startsWith("video/"_ls)) { QMediaPlayer player; -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) player.setSource(url); -#else - player.setMedia(url); -#endif co_await qCoro(&player, &QMediaPlayer::mediaStatusChanged); -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) auto resolution = player.metaData().value(QMediaMetaData::Resolution).toSize(); -#else - auto resolution = player.metaData(QMediaMetaData::Resolution).toSize(); -#endif content = new EventContent::VideoContent(url, fileInfo.size(), mime, resolution, fileInfo.fileName()); } else { content = new EventContent::FileContent(url, fileInfo.size(), mime, fileInfo.fileName()); diff --git a/src/trayicon_sni.cpp b/src/trayicon_sni.cpp index 8ca0c7a4f..045521c74 100644 --- a/src/trayicon_sni.cpp +++ b/src/trayicon_sni.cpp @@ -17,11 +17,7 @@ TrayIcon::TrayIcon(QObject *parent) }); connect(&WindowController::instance(), &WindowController::windowChanged, this, [this] { -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) setAssociatedWindow(WindowController::instance().window()); -#else - Q_UNUSED(this); -#endif }); }