Skip to content

Commit

Permalink
Force app_id to be set in more places (#2661)
Browse files Browse the repository at this point in the history
While testing the new version of kvirc I noticed that the setup window was using the `net.kvirc.kvirc` app_id. It seems my previous fix was incomplete since that window is started before the other window where we set the app_id.

Fix it by adding it to the setup window as well, and also just add it to a bunch more locations so that the chances of it not being set elsewhere are lower.
  • Loading branch information
ReillyBrogan authored Jul 12, 2024
1 parent 3d794fb commit e7f1aff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/kvilib/tal/KviTalApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ KviTalApplication::KviTalApplication(int & iArgc, char ** ppcArgv)
{
// Session management has been broken by source incompatible changes.
QObject::connect(this, SIGNAL(commitDataRequest(QSessionManager &)), this, SLOT(commitData(QSessionManager &)));

// set name of the app desktop file; used by wayland to load the window icon
QGuiApplication::setDesktopFileName("net.kvirc.KVIrc" KVIRC_VERSION_MAJOR);
}

KviTalApplication::~KviTalApplication()
Expand Down
2 changes: 0 additions & 2 deletions src/kvirc/ui/KviMainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ KviMainWindow::KviMainWindow(QWidget * pParent)
// We try to avois this as much as possible, since it forces the use of the low-res 16x16 icon
setWindowIcon(*(g_pIconManager->getSmallIcon(KviIconManager::KVIrc)));
#endif
// set name of the app desktop file; used by wayland to load the window icon
QGuiApplication::setDesktopFileName("net.kvirc.KVIrc" KVIRC_VERSION_MAJOR);
setWindowTitle(KVI_DEFAULT_FRAME_CAPTION);

m_pSplitter = new QSplitter(Qt::Horizontal, this);
Expand Down
3 changes: 3 additions & 0 deletions src/kvirc/ui/KviWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ KviWindow::KviWindow(Type eType, const QString & szName, KviConsoleWindow * lpCo
setFocusPolicy(Qt::StrongFocus);
connect(g_pApp, SIGNAL(reloadImages()), this, SLOT(reloadImages()));

// set name of the app desktop file; used by wayland to load the window icon
QGuiApplication::setDesktopFileName("net.kvirc.KVIrc" KVIRC_VERSION_MAJOR);

setAttribute(Qt::WA_InputMethodEnabled, true);
}

Expand Down
3 changes: 3 additions & 0 deletions src/modules/setup/SetupWizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ SetupWizard::SetupWizard()
QString szImagePath;
g_pApp->getGlobalKvircDirectory(szImagePath, KviApplication::Pics, "kvi_setup_label.png");

// set name of the app desktop file; used by wayland to load the window icon
QGuiApplication::setDesktopFileName("net.kvirc.KVIrc" KVIRC_VERSION_MAJOR);

m_pLabelPixmap = new QPixmap(szImagePath);
if(m_pLabelPixmap->isNull())
{
Expand Down

0 comments on commit e7f1aff

Please sign in to comment.