Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
/ QGitTag Public archive

A library for Qt5 that uses the GitHub API to provide information about tags.

License

Notifications You must be signed in to change notification settings

crow-translate/QGitTag

Repository files navigation

QGitTag

GitHub (pre-)release

QGitTag is a library for Qt5 that uses the GitHub API to provide information about releases that can be used to check for updates.

Example:

QCoreApplication app(argc, argv);
QCoreApplication::setApplicationVersion("0.9.0");

QGitTag tag;
tag.get("crow-translate", "Crow-Translate")
connect(&tag, &QGitTag::finished, [&tag] {
    QTextStream out(stdout);
    if (tag.tagName() >= QCoreApplication::applicationVersion())
        out << "Update available: " + tag.url().toString() << endl;
});

return QCoreApplication::exec()

For real example of usage you can look into my other project: Crow Translate.

Installation

To include the library files you could use FetchContent CMake module. Or you can add it as a git submodule to your project and include it's contents:

QMake:

include(src/third-party/qgittag/qgittag.pri)

CMake:

add_subdirectory(src/third-party/qgittag)