Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugins/application-tray/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ target_link_libraries(${PLUGIN_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::CorePrivate
Qt${QT_VERSION_MAJOR}::WidgetsPrivate
Dtk${DTK_VERSION_MAJOR}::Core
Dtk${DTK_VERSION_MAJOR}::Gui
Dtk${DTK_VERSION_MAJOR}::Widget
Expand Down
8 changes: 8 additions & 0 deletions plugins/application-tray/sniprotocolhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
#include <QMouseEvent>
#include <QWindow>
#include <QThreadPool>
#include <QRunnable>

Check warning on line 17 in plugins/application-tray/sniprotocolhandler.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <QRunnable> not found. Please note: Cppcheck does not need standard library headers to get proper results.

#include <DGuiApplicationHelper>

Check warning on line 19 in plugins/application-tray/sniprotocolhandler.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <DGuiApplicationHelper> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <private/qobject_p.h>

Check warning on line 20 in plugins/application-tray/sniprotocolhandler.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <private/qobject_p.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <private/qmenu_p.h>

Check warning on line 21 in plugins/application-tray/sniprotocolhandler.cpp

View workflow job for this annotation

GitHub Actions / cppcheck

Include file: <private/qmenu_p.h> not found. Please note: Cppcheck does not need standard library headers to get proper results.

DGUI_USE_NAMESPACE

Expand All @@ -32,6 +34,12 @@
{
QObject::connect(this, &DBusMenuImporter::menuUpdated, this, [this] (QMenu *menu) {
menu->setFixedSize(menu->sizeHint());
// TODO 删除 QMenu 的滚动功能,修复首次子菜单显示滚动指示器问题
if (auto dp = static_cast<QMenuPrivate*>(QObjectPrivate::get(menu))) {
if (auto scroll = dp->scroll) {
scroll->scrollFlags = QMenuPrivate::QMenuScroller::ScrollNone;
}
}
}, Qt::QueuedConnection);
}
virtual QMenu *createMenu(QWidget *parent) override
Expand Down
Loading