Skip to content

Commit

Permalink
GUI: quick fix for #1957 (Unable to compile gui.pro with Qt Creator i…
Browse files Browse the repository at this point in the history
…n Windows)
  • Loading branch information
Daniel Marjamäki committed Aug 19, 2010
1 parent cfa7b49 commit 2fea5f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion gui/gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ win32 {
DEFINES += _CRT_SECURE_NO_WARNINGS
RC_FILE = cppcheck-gui.rc
HEADERS += ../cli/resource.h
LIBS += -lshlwapi -lhtmlhelp
LIBS += -lshlwapi
}

15 changes: 2 additions & 13 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@
#include "logview.h"
#include "filelist.h"

// HTMLHelp is only available in Windows
#ifdef WIN32
#include <windows.h>
#include <htmlhelp.h>
#endif

MainWindow::MainWindow() :
mSettings(new QSettings("Cppcheck", "Cppcheck-GUI", this)),
mApplications(new ApplicationList(this)),
Expand Down Expand Up @@ -89,12 +83,7 @@ MainWindow::MainWindow() :
connect(mUI.mActionNewProjectFile, SIGNAL(triggered()), this, SLOT(NewProjectFile()));
connect(mUI.mActionOpenProjectFile, SIGNAL(triggered()), this, SLOT(OpenProjectFile()));

#ifdef WIN32
connect(mUI.mActionHelpContents, SIGNAL(triggered()), this, SLOT(OpenHelpContents()));
#else
// Hide if not Windows
mUI.mActionHelpContents->setVisible(false);
#endif

CreateLanguageMenuItems();
LoadSettings();
Expand Down Expand Up @@ -662,13 +651,13 @@ void MainWindow::OpenHelpContents()

void MainWindow::OpenHtmlHelpContents()
{
#ifdef WIN32
/*
QString file("/cppcheck.chm");
QString exeFolder = QDir::currentPath();
exeFolder += file;
exeFolder = QDir::toNativeSeparators(exeFolder);
HtmlHelp(NULL, exeFolder.utf16(), HH_DISPLAY_TOPIC, NULL);
#endif // WIN32
*/
}

void MainWindow::OpenProjectFile()
Expand Down

0 comments on commit 2fea5f0

Please sign in to comment.