Drop support of Qt 5

Also remove usage of some deprecated stuff.

PR #19338.
This commit is contained in:
Vladimir Golovnev
2023-07-20 11:17:27 +03:00
committed by GitHub
parent 5e610cfdcf
commit dbe79484d2
55 changed files with 48 additions and 462 deletions

View File

@@ -67,13 +67,8 @@ AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent)
, m_ui {new Ui::AutomatedRssDownloader}
, m_addTorrentParamsWidget {new AddTorrentParamsWidget}
, m_storeDialogSize {u"RssFeedDownloader/geometrySize"_s}
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
, m_storeMainSplitterState {u"GUI/Qt6/RSSFeedDownloader/HSplitterSizes"_s}
, m_storeRuleDefSplitterState {u"GUI/Qt6/RSSFeedDownloader/RuleDefSplitterState"_s}
#else
, m_storeMainSplitterState {u"RssFeedDownloader/qt5/hsplitterSizes"_s}
, m_storeRuleDefSplitterState {u"RssFeedDownloader/qt5/RuleDefSplitterState"_s}
#endif
{
m_ui->setupUi(this);

View File

@@ -242,7 +242,7 @@ void FeedListWidget::dragMoveEvent(QDragMoveEvent *event)
{
QTreeWidget::dragMoveEvent(event);
QTreeWidgetItem *item = itemAt(event->pos());
QTreeWidgetItem *item = itemAt(event->position().toPoint());
if ((item == m_unreadStickyItem) // Prohibit dropping onto global unread counter
|| selectedItems().contains(m_unreadStickyItem) // Prohibit dragging of global unread counter
|| (item && isFeed(item))) // Prohibit dropping onto feeds
@@ -253,7 +253,7 @@ void FeedListWidget::dragMoveEvent(QDragMoveEvent *event)
void FeedListWidget::dropEvent(QDropEvent *event)
{
QTreeWidgetItem *destFolderItem = itemAt(event->pos());
QTreeWidgetItem *destFolderItem = itemAt(event->position().toPoint());
RSS::Folder *destFolder = (destFolderItem
? static_cast<RSS::Folder *>(getRSSItem(destFolderItem))
: RSS::Session::instance()->rootFolder());