Skip to content

Commit

Permalink
Fixed mHasTaskbarButton not being initialized. Removed addToRecentDoc…
Browse files Browse the repository at this point in the history
…s (XP compat).
  • Loading branch information
ckaiser committed Feb 21, 2016
1 parent 4d7e070 commit 43c652b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
3 changes: 2 additions & 1 deletion lightscreenwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ LightscreenWindow::LightscreenWindow(QWidget *parent) :
mWasVisible(true),
mLastMessage(0),
mLastMode(-1),
mLastScreenshot()
mLastScreenshot(),
mHasTaskbarButton(false)
{
ui.setupUi(this);

Expand Down
18 changes: 0 additions & 18 deletions tools/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,6 @@

#include "os.h"

void os::addToRecentDocuments(QString fileName)
{
#ifdef Q_OS_WIN
LPCWSTR szFileName = QDir::toNativeSeparators(fileName).toStdWString().c_str();
SHARDAPPIDINFO info;
IShellItem* item;

if (SUCCEEDED(SHCreateItemFromParsingName(szFileName, NULL, IID_PPV_ARGS(&item)))) {
info.psi = item;
info.pszAppID = L"K.Lightscreen"; // our AppID - see above

SHAddToRecentDocs (SHARD_APPIDINFO, &info);
}
#else
Q_UNUSED(fileName)
#endif
}

QPixmap os::cursor()
{
#ifdef Q_OS_WIN
Expand Down
3 changes: 0 additions & 3 deletions tools/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ class QIcon;

namespace os
{
// Adds the filename to the Windows recent document list (useful for Windows 7 jump lists)
void addToRecentDocuments(QString fileName);

// Returns the cursor pixmap in Windows
QPixmap cursor();

Expand Down
2 changes: 0 additions & 2 deletions tools/screenshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ void Screenshot::save()
else {
result = Screenshot::Fail;
}

os::addToRecentDocuments(fileName);
}

mOptions.fileName = fileName;
Expand Down

0 comments on commit 43c652b

Please sign in to comment.