crow-translate / QGitTag

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

About

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

License:GNU General Public License v3.0


Languages

Language:C++ 93.9%Language:CMake 4.9%Language:QMake 1.2%