Skip to content

Commit

Permalink
Fixed|Windows: Main window icon is missing
Browse files Browse the repository at this point in the history
IssueID #1589
  • Loading branch information
skyjake committed Oct 8, 2016
1 parent af025dc commit 2a2ea08
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions doomsday/apps/client/CMakeLists.txt
Expand Up @@ -98,6 +98,12 @@ set (MACX_RESOURCES
doomsday.pk3
)

# Windows: Use Qt resources.
if (WIN32)
qt5_add_resources (RCC_SOURCES res/windows/client.qrc)
list (APPEND src ${RCC_SOURCES})
endif ()

deng_add_application (client ${src} EXTRA_RESOURCES ${MACX_RESOURCES})

# There's some old code here so relax the warnings a bit.
Expand Down
6 changes: 6 additions & 0 deletions doomsday/apps/client/res/windows/client.qrc
@@ -0,0 +1,6 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<file>doomsday.ico</file>
</qresource>
</RCC>
4 changes: 1 addition & 3 deletions doomsday/apps/client/src/ui/clientwindow.cpp
Expand Up @@ -790,9 +790,7 @@ ClientWindow::ClientWindow(String const &id)

#ifdef WIN32
// Set an icon for the window.
Path iconPath = DENG2_APP->nativeBasePath() / "data\\graphics\\doomsday.ico";
LOG_DEBUG("Window icon: ") << NativePath(iconPath).pretty();
setWindowIcon(QIcon(iconPath));
setIcon(QIcon(":/doomsday.ico"));
#endif

d->setupUI();
Expand Down

0 comments on commit 2a2ea08

Please sign in to comment.