Skip to content

Commit

Permalink
"ignore version" functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
pypt committed Jun 1, 2012
1 parent f66b65c commit b9696b2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions fvignoredversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,20 @@ bool FVIgnoredVersions::VersionIsIgnored(QString version)
// Fallback - skip
return true;
}

void FVIgnoredVersions::IgnoreVersion(QString version)
{
if (version == FV_APP_VERSION) {
// Don't ignore the current version
return;
}

if (version.isEmpty()) {
return;
}

QSettings settings;
settings.setValue(FV_IGNORED_VERSIONS_LATEST_SKIPPED_VERSION_KEY, version);

return;
}
1 change: 1 addition & 0 deletions fvignoredversions.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class FVIgnoredVersions : public QObject

public:
static bool VersionIsIgnored(QString version);
static void IgnoreVersion(QString version);

private:
explicit FVIgnoredVersions(QObject *parent = 0);
Expand Down

0 comments on commit b9696b2

Please sign in to comment.