Skip to content

Commit

Permalink
fix: Cannot open deepin manual in desktop
Browse files Browse the repository at this point in the history
Direct use `DGuiApplicationHelper::handleHelpAction`

log: fix cannot open deepin manual in desktop

bug: https://pms.uniontech.com/bug-view-273551.html
  • Loading branch information
Johnson-zs committed Sep 14, 2024
1 parent 0f72668 commit be1165c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include <dfm-framework/event/event.h>

#include <DApplication>
#include <DGuiApplicationHelper>

#include <QAction>

DFMBASE_USE_NAMESPACE
Expand Down Expand Up @@ -176,15 +178,9 @@ bool ShortcutOper::disableShortcut() const

void ShortcutOper::helpAction()
{
class PublicApplication : public DApplication
{
public:
using DApplication::handleHelpAction;
};

QString appName = qApp->applicationName();
qApp->setApplicationName("dde");
reinterpret_cast<PublicApplication *>(DApplication::instance())->handleHelpAction();
DGuiApplicationHelper::instance()->handleHelpAction();
qApp->setApplicationName(appName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <DApplication>
#include <DFileDragClient>
#include <DGuiApplicationHelper>

#include <QScrollBar>
#include <QUrl>
Expand Down Expand Up @@ -581,15 +582,9 @@ bool CollectionViewPrivate::drop(QDropEvent *event)

void CollectionViewPrivate::helpAction()
{
class PublicApplication : public DApplication
{
public:
using DApplication::handleHelpAction;
};

QString appName = qApp->applicationName();
qApp->setApplicationName("dde");
reinterpret_cast<PublicApplication *>(DApplication::instance())->handleHelpAction();
DGuiApplicationHelper::instance()->handleHelpAction();
qApp->setApplicationName(appName);
}

Expand Down

0 comments on commit be1165c

Please sign in to comment.