mirror of
https://github.com/arcan1s/reportabug.git
synced 2025-04-24 15:27:18 +00:00
add token support
This commit is contained in:
parent
bc10fc76ab
commit
8c833a8146
13
README.md
13
README.md
@ -4,7 +4,7 @@ reportabug
|
|||||||
Information
|
Information
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
A simple Qt application/library which allows users to create an issue for GitHub projects. It may work over [GitHub](https://github.com) or [GitReport](https://gitreports.com/). For the developer configuration please use `config.h.in` header.
|
Qt application/library which allows users to create an issue for GitHub projects. It may work over [GitHub](https://github.com) or [GitReport](https://gitreports.com/). For the developer configuration please use `config.h.in` header.
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
@ -20,7 +20,7 @@ Available variables:
|
|||||||
* `TAG_BODY` - default body of an issue. It may be used for both modules.
|
* `TAG_BODY` - default body of an issue. It may be used for both modules.
|
||||||
* `TAG_TITLE` - default title of an issue. It may be used only for GitHub module.
|
* `TAG_TITLE` - default title of an issue. It may be used only for GitHub module.
|
||||||
* `TAG_ASSIGNEE` - assign an issue to this account. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
* `TAG_ASSIGNEE` - assign an issue to this account. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
||||||
* `TAG_LABELS` - set this labels to an issue. Labels should be comma separated. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
* `TAG_LABELS` - set these labels to an issue. Labels should be comma separated. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
||||||
* `TAG_MILESTONE` - set this milestone to an issue. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
* `TAG_MILESTONE` - set this milestone to an issue. It may be used only for GitHub module. This tag will work only if user has push access. If it will be empty, it will be ignored.
|
||||||
|
|
||||||
### Send issue over GitHub ###
|
### Send issue over GitHub ###
|
||||||
@ -36,6 +36,14 @@ Available variables:
|
|||||||
|
|
||||||
This module requires `QtNetwork` module. To disable this module use `-DENABLE_GITHUB=0` cmake flag.
|
This module requires `QtNetwork` module. To disable this module use `-DENABLE_GITHUB=0` cmake flag.
|
||||||
|
|
||||||
|
### Send issue over GitHub using own token ###
|
||||||
|
|
||||||
|
This module requires your access token. Please visit [this page](https://github.com/settings/applications) and generate a new one. Needed scopes are `public_repo` (or `repo` if you will use it for a private repository). Please keep in mind that passing the token in the clear, you may discredit your account. The typical POST request is
|
||||||
|
|
||||||
|
curl -X POST -H "Authorization: token token" -d '{"title":"A new bug","body":"Some error occurs"}' https://api.github.com/repos/owner/repo/issues
|
||||||
|
|
||||||
|
This module requires `QtNetwork` module. To enable this module set up your token using `-DOWN_GITHUB_TOKEN=0` cmake flag.
|
||||||
|
|
||||||
### Send issue over GitReport ###
|
### Send issue over GitReport ###
|
||||||
|
|
||||||
[GitReport](https://gitreports.com/about) is used for creating issue. Please visit [this page](https://gitreports.com/) and set up it for your repository.
|
[GitReport](https://gitreports.com/about) is used for creating issue. Please visit [this page](https://gitreports.com/) and set up it for your repository.
|
||||||
@ -105,6 +113,7 @@ Installation
|
|||||||
* `-DBUILD_DOCS:BOOL=1` - build developer documentation
|
* `-DBUILD_DOCS:BOOL=1` - build developer documentation
|
||||||
* `-DENABLE_GITHUB=0` - disable GitHub module
|
* `-DENABLE_GITHUB=0` - disable GitHub module
|
||||||
* `-DENABLE_GITREPORT=0` - disable GitReport module
|
* `-DENABLE_GITREPORT=0` - disable GitReport module
|
||||||
|
* `-DOWN_GITHUB_TOKEN=STRING` - use STRING as own GitHub token
|
||||||
* `-DUSE_QT5:BOOL=0` - use Qt4 instead of Qt5 for GUI
|
* `-DUSE_QT5:BOOL=0` - use Qt4 instead of Qt5 for GUI
|
||||||
|
|
||||||
Additional information
|
Additional information
|
||||||
|
@ -23,11 +23,21 @@ message (STATUS "Version: ${SUBPROJECT_VERSION}")
|
|||||||
message (STATUS "Build date: ${CURRENT_DATE}")
|
message (STATUS "Build date: ${CURRENT_DATE}")
|
||||||
|
|
||||||
# install options
|
# install options
|
||||||
option (USE_QT5 "Use Qt5 instead of Qt4" ON)
|
|
||||||
option (BUILD_AS_LIBRARY "Build the application as a shared library" ON)
|
option (BUILD_AS_LIBRARY "Build the application as a shared library" ON)
|
||||||
option (BUILD_DOCS "Build developers documentation" OFF)
|
option (BUILD_DOCS "Build developers documentation" OFF)
|
||||||
option (ENABLE_GITHUB "Enable GitHub module" ON)
|
option (ENABLE_GITHUB "Enable GitHub module" ON)
|
||||||
option (ENABLE_GITREPORT "Enable GitReport module" ON)
|
option (ENABLE_GITREPORT "Enable GitReport module" ON)
|
||||||
|
option (USE_QT5 "Use Qt5 instead of Qt4" ON)
|
||||||
|
set (OWN_GITHUB_TOKEN "" CACHE STRING "Use own GitHub token instead of GitReport")
|
||||||
|
# set flags
|
||||||
|
if (OWN_GITHUB_TOKEN STREQUAL "")
|
||||||
|
set (USE_OWN_TOKEN OFF)
|
||||||
|
else ()
|
||||||
|
set (USE_OWN_TOKEN ON)
|
||||||
|
endif ()
|
||||||
|
if (USE_OWN_TOKEN)
|
||||||
|
set (ENABLE_GITREPORT OFF)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# flags
|
# flags
|
||||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
set (SOURCES main.cpp reportabug.cpp)
|
set (SOURCES main.cpp reportabug.cpp)
|
||||||
set (HEADERS reportabug.h)
|
set (HEADERS reportabug.h)
|
||||||
set (FORMS reportabug.ui)
|
set (FORMS reportabug.ui)
|
||||||
if (ENABLE_GITHUB)
|
if (ENABLE_GITHUB OR USE_OWN_TOKEN)
|
||||||
set (SOURCES ${SOURCES} githubmodule.cpp)
|
set (SOURCES ${SOURCES} githubmodule.cpp)
|
||||||
set (HEADERS ${HEADERS} githubmodule.h)
|
set (HEADERS ${HEADERS} githubmodule.h)
|
||||||
endif ()
|
endif ()
|
||||||
@ -25,7 +25,7 @@ if (USE_QT5)
|
|||||||
add_definitions (${Qt5Widgets_DEFINITIONS})
|
add_definitions (${Qt5Widgets_DEFINITIONS})
|
||||||
include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||||
set (QT_USED_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES})
|
set (QT_USED_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES})
|
||||||
if (ENABLE_GITHUB)
|
if (ENABLE_GITHUB OR USE_OWN_TOKEN)
|
||||||
find_package (Qt5Network REQUIRED)
|
find_package (Qt5Network REQUIRED)
|
||||||
add_definitions (${Qt5Network_DEFINITIONS})
|
add_definitions (${Qt5Network_DEFINITIONS})
|
||||||
include_directories (${Qt5Network_INCLUDE_DIRS})
|
include_directories (${Qt5Network_INCLUDE_DIRS})
|
||||||
@ -48,7 +48,7 @@ if (USE_QT5)
|
|||||||
|
|
||||||
else ()
|
else ()
|
||||||
set (QT_USED_COMPONENTS QtCore QtGui)
|
set (QT_USED_COMPONENTS QtCore QtGui)
|
||||||
if (ENABLE_GITHUB)
|
if (ENABLE_GITHUB OR USE_OWN_TOKEN)
|
||||||
set (QT_USED_COMPONENTS ${QT_USED_COMPONENTS} QtNetwork)
|
set (QT_USED_COMPONENTS ${QT_USED_COMPONENTS} QtNetwork)
|
||||||
endif ()
|
endif ()
|
||||||
if (ENABLE_GITREPORT)
|
if (ENABLE_GITREPORT)
|
||||||
@ -57,7 +57,7 @@ else ()
|
|||||||
find_package(Qt4 COMPONENTS ${QT_USED_COMPONENTS} REQUIRED)
|
find_package(Qt4 COMPONENTS ${QT_USED_COMPONENTS} REQUIRED)
|
||||||
include (${QT_USE_FILE})
|
include (${QT_USE_FILE})
|
||||||
set (QT_USED_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
set (QT_USED_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
||||||
if (ENABLE_GITHUB)
|
if (ENABLE_GITHUB OR USE_OWN_TOKEN)
|
||||||
set (QT_USED_LIBRARIES ${QT_USED_LIBRARIES} ${QT_QTNETWORK_LIBRARY})
|
set (QT_USED_LIBRARIES ${QT_USED_LIBRARIES} ${QT_QTNETWORK_LIBRARY})
|
||||||
endif ()
|
endif ()
|
||||||
if (ENABLE_GITREPORT)
|
if (ENABLE_GITREPORT)
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* main configuration
|
* Main configuration
|
||||||
*/
|
*/
|
||||||
// the owner of the source repository
|
// the owner of the source repository
|
||||||
#define OWNER "arcan1s"
|
#define OWNER "arcan1s"
|
||||||
@ -35,13 +35,13 @@
|
|||||||
#define TAG_MILESTONE ""
|
#define TAG_MILESTONE ""
|
||||||
// comma separated
|
// comma separated
|
||||||
#define TAG_LABELS "auto,bug"
|
#define TAG_LABELS "auto,bug"
|
||||||
// modules. Please use -DENABLE_GITHUB and -DENABLE_GITREPORT cmake flags
|
// modules. Please use -DENABLE_GITHUB= and -DENABLE_GITREPORT= cmake flags
|
||||||
// DO NOT EDIT THEM!
|
// DO NOT EDIT THEM!
|
||||||
#cmakedefine ENABLE_GITHUB
|
#cmakedefine ENABLE_GITHUB
|
||||||
#cmakedefine ENABLE_GITREPORT
|
#cmakedefine ENABLE_GITREPORT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* configuration of creating an issue using GitHub API
|
* Configuration of creating an issue using GitHub API
|
||||||
*/
|
*/
|
||||||
// combobox text
|
// combobox text
|
||||||
#define GITHUB_COMBOBOX "I want to report a bug using my GitHub account"
|
#define GITHUB_COMBOBOX "I want to report a bug using my GitHub account"
|
||||||
@ -50,10 +50,25 @@
|
|||||||
#define ISSUES_URL "https://api.github.com/repos/$OWNER/$PROJECT/issues"
|
#define ISSUES_URL "https://api.github.com/repos/$OWNER/$PROJECT/issues"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* configuration of creating an issue using GitReports
|
* Configuration of creating an issue using GitHub API and own token
|
||||||
*
|
*
|
||||||
* please, visit https://gitreports.com/
|
* This module will be used instead of GitReport module.
|
||||||
* and set up it for your repository
|
* To create a token please visit https://github.com/settings/applications
|
||||||
|
* and generate new one. Needed scopes are public_repo
|
||||||
|
* (or repo if you will use it for a private repository).
|
||||||
|
* Please keep in mind that passing the token in the clear,
|
||||||
|
* you may discredit your account.
|
||||||
|
*/
|
||||||
|
// please use -DOWN_GITHUB_TOKEN= cmake flag to define it
|
||||||
|
// if it is empty, it will be ignored
|
||||||
|
// DO NOT EDIT IT!
|
||||||
|
#cmakedefine OWN_GITHUB_TOKEN "@OWN_GITHUB_TOKEN@"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Configuration of creating an issue using GitReports
|
||||||
|
*
|
||||||
|
* Please, visit https://gitreports.com/
|
||||||
|
* and set up it for your repository.
|
||||||
*/
|
*/
|
||||||
// combobox text
|
// combobox text
|
||||||
#define GITREPORT_COMBOBOX "GitHub? I don't understand what do you want from me!"
|
#define GITREPORT_COMBOBOX "GitHub? I don't understand what do you want from me!"
|
||||||
|
@ -124,9 +124,14 @@ void GithubModule::sendReportUsingGithub(const QMap<QString, QString> info)
|
|||||||
if (debug) qDebug() << "[GithubModule]" << "[sendReportUsingGithub]";
|
if (debug) qDebug() << "[GithubModule]" << "[sendReportUsingGithub]";
|
||||||
|
|
||||||
// authentication
|
// authentication
|
||||||
|
QString headerData;
|
||||||
|
if (info.contains(QString("userdata")))
|
||||||
|
headerData = QString("token ") + info[QString("userdata")];
|
||||||
|
else {
|
||||||
QString concatenated = info[QString("username")] + QString(":") + info[QString("password")];
|
QString concatenated = info[QString("username")] + QString(":") + info[QString("password")];
|
||||||
QByteArray userData = concatenated.toLocal8Bit().toBase64();
|
QByteArray userData = concatenated.toLocal8Bit().toBase64();
|
||||||
QString headerData = QString("Basic ") + userData;
|
headerData = QString("Basic ") + userData;
|
||||||
|
}
|
||||||
// text
|
// text
|
||||||
QByteArray text = prepareRequest(info[QString("title")], info[QString("body")]);
|
QByteArray text = prepareRequest(info[QString("title")], info[QString("body")]);
|
||||||
QByteArray textSize = QByteArray::number(text.size());
|
QByteArray textSize = QByteArray::number(text.size());
|
||||||
|
@ -38,7 +38,14 @@ class QNetworkReply;
|
|||||||
* [the API page](https://developer.github.com/v3/issues/) for more details.
|
* [the API page](https://developer.github.com/v3/issues/) for more details.
|
||||||
* This module requires an users authentication. The typical POST request is:
|
* This module requires an users authentication. The typical POST request is:
|
||||||
* @code
|
* @code
|
||||||
* curl -X POST -u user:pass -d '{"title":"A new bug","body":"Some error occurs"}' https://api.github.com/repos/owner/repo/issues
|
* curl -X POST -u user:pass -d '{"title":"A new bug","body":"Some error occurs"}' \
|
||||||
|
* https://api.github.com/repos/owner/repo/issues
|
||||||
|
* @endcode
|
||||||
|
*
|
||||||
|
* The module also may send request using given token. In this case request is:
|
||||||
|
* @code
|
||||||
|
* curl -X POST -H "Authorization: token token" -d '{"title":"A new bug","body":"Some error occurs"}' \
|
||||||
|
* https://api.github.com/repos/owner/repo/issues
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
* This module depends on QtNetwork module.
|
* This module depends on QtNetwork module.
|
||||||
@ -67,6 +74,7 @@ public slots:
|
|||||||
* body (body of an issue),
|
* body (body of an issue),
|
||||||
* password (GitHub password),
|
* password (GitHub password),
|
||||||
* title (title of an issue),
|
* title (title of an issue),
|
||||||
|
* userdata (given GitHub token, it is optional key),
|
||||||
* username (GitHub user name),
|
* username (GitHub user name),
|
||||||
*/
|
*/
|
||||||
void sendReportUsingGithub(const QMap<QString, QString> info);
|
void sendReportUsingGithub(const QMap<QString, QString> info);
|
||||||
|
@ -29,9 +29,9 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#ifdef ENABLE_GITHUB
|
#if defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN)
|
||||||
#include "githubmodule.h"
|
#include "githubmodule.h"
|
||||||
#endif /* ENABLE_GITHUB */
|
#endif /* defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN) */
|
||||||
#ifdef ENABLE_GITREPORT
|
#ifdef ENABLE_GITREPORT
|
||||||
#include "gitreportmodule.h"
|
#include "gitreportmodule.h"
|
||||||
#endif /* ENABLE_GITREPORT */
|
#endif /* ENABLE_GITREPORT */
|
||||||
@ -63,9 +63,9 @@ Reportabug::~Reportabug()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << "[Reportabug]" << "[~Reportabug]";
|
if (debug) qDebug() << "[Reportabug]" << "[~Reportabug]";
|
||||||
|
|
||||||
#ifdef ENABLE_GITHUB
|
#if defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN)
|
||||||
delete github;
|
delete github;
|
||||||
#endif /* ENABLE_GITHUB */
|
#endif /* defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN) */
|
||||||
#ifdef ENABLE_GITREPORT
|
#ifdef ENABLE_GITREPORT
|
||||||
delete gitreport;
|
delete gitreport;
|
||||||
#endif /* ENABLE_GITREPORT */
|
#endif /* ENABLE_GITREPORT */
|
||||||
@ -106,9 +106,9 @@ void Reportabug::createComboBox()
|
|||||||
|
|
||||||
ui->comboBox->clear();
|
ui->comboBox->clear();
|
||||||
if (modules[0])
|
if (modules[0])
|
||||||
ui->comboBox->addItem(QString(GITHUB_COMBOBOX));
|
ui->comboBox->addItem(QApplication::translate("Reportabug", GITHUB_COMBOBOX));
|
||||||
if (modules[1])
|
if (modules[1] || modules[2])
|
||||||
ui->comboBox->addItem(QString(GITREPORT_COMBOBOX));
|
ui->comboBox->addItem(QApplication::translate("Reportabug", GITREPORT_COMBOBOX));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -120,20 +120,28 @@ int Reportabug::getNumberByIndex(const int index)
|
|||||||
if (debug) qDebug() << "[Reportabug]" << "[getNumberByIndex]";
|
if (debug) qDebug() << "[Reportabug]" << "[getNumberByIndex]";
|
||||||
if (debug) qDebug() << "[Reportabug]" << "[getNumberByIndex]" << ":" << "Index" << index;
|
if (debug) qDebug() << "[Reportabug]" << "[getNumberByIndex]" << ":" << "Index" << index;
|
||||||
|
|
||||||
if (index == -1)
|
if ((modules[0]) && (modules[1])) {
|
||||||
// nothing to do
|
if (index == 0)
|
||||||
|
return 0;
|
||||||
|
else if (index == 1)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if ((modules[0]) && (modules[2])) {
|
||||||
|
if (index == 0)
|
||||||
|
return 0;
|
||||||
|
else if (index == 1)
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
else if ((modules[1]) && (modules[2]))
|
||||||
|
// wtf??
|
||||||
return -1;
|
return -1;
|
||||||
else if ((modules[0]) && (modules[1]))
|
|
||||||
// both are enabled
|
|
||||||
return index;
|
|
||||||
else if (modules[0])
|
else if (modules[0])
|
||||||
// only github is enabled
|
|
||||||
return 0;
|
return 0;
|
||||||
else if (modules[1])
|
else if (modules[1])
|
||||||
// only gitreport is enabled
|
|
||||||
return 1;
|
return 1;
|
||||||
else
|
else if (modules[2])
|
||||||
// nothing to do
|
return 2;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,10 +155,13 @@ void Reportabug::initModules()
|
|||||||
|
|
||||||
modules[0] = false;
|
modules[0] = false;
|
||||||
modules[1] = false;
|
modules[1] = false;
|
||||||
|
modules[2] = false;
|
||||||
|
|
||||||
|
#if defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN)
|
||||||
|
github = new GithubModule(this, debug);
|
||||||
|
#endif /* defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN) */
|
||||||
#ifdef ENABLE_GITHUB
|
#ifdef ENABLE_GITHUB
|
||||||
modules[0] = true;
|
modules[0] = true;
|
||||||
github = new GithubModule(this, debug);
|
|
||||||
#endif /* ENABLE_GITHUB */
|
#endif /* ENABLE_GITHUB */
|
||||||
#ifdef ENABLE_GITREPORT
|
#ifdef ENABLE_GITREPORT
|
||||||
modules[1] = true;
|
modules[1] = true;
|
||||||
@ -158,6 +169,9 @@ void Reportabug::initModules()
|
|||||||
// 4 is a magic number. Seriously
|
// 4 is a magic number. Seriously
|
||||||
ui->verticalLayout->insertWidget(4, gitreport->webView);
|
ui->verticalLayout->insertWidget(4, gitreport->webView);
|
||||||
#endif /* ENABLE_GITREPORT */
|
#endif /* ENABLE_GITREPORT */
|
||||||
|
#ifdef OWN_GITHUB_TOKEN
|
||||||
|
modules[2] = true;
|
||||||
|
#endif /* OWN_GITHUB_TOKEN */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -203,10 +217,10 @@ void Reportabug::sendReport()
|
|||||||
|
|
||||||
int number = getNumberByIndex(ui->comboBox->currentIndex());
|
int number = getNumberByIndex(ui->comboBox->currentIndex());
|
||||||
QMap<QString, QString> info;
|
QMap<QString, QString> info;
|
||||||
info[QString("username")] = ui->lineEdit_username->text();
|
info[QString("body")] = ui->textEdit->toPlainText();
|
||||||
info[QString("password")] = ui->lineEdit_password->text();
|
info[QString("password")] = ui->lineEdit_password->text();
|
||||||
info[QString("title")] = ui->lineEdit_title->text();
|
info[QString("title")] = ui->lineEdit_title->text();
|
||||||
info[QString("body")] = ui->textEdit->toPlainText();
|
info[QString("username")] = ui->lineEdit_username->text();
|
||||||
|
|
||||||
if (number == -1)
|
if (number == -1)
|
||||||
return;
|
return;
|
||||||
@ -218,6 +232,12 @@ void Reportabug::sendReport()
|
|||||||
else if (number == 1)
|
else if (number == 1)
|
||||||
gitreport->sendReportUsingGitreport(info);
|
gitreport->sendReportUsingGitreport(info);
|
||||||
#endif /* ENABLE_GITREPORT */
|
#endif /* ENABLE_GITREPORT */
|
||||||
|
#ifdef OWN_GITHUB_TOKEN
|
||||||
|
else if (number == 2) {
|
||||||
|
info[QString("userdata")] = QString(OWN_GITHUB_TOKEN);
|
||||||
|
github->sendReportUsingGithub(info);
|
||||||
|
}
|
||||||
|
#endif /* OWN_GITHUB_TOKEN */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -281,4 +301,11 @@ void Reportabug::updateTabs(const int index)
|
|||||||
connect(gitreport->webView, SIGNAL(loadFinished(bool)), gitreport, SLOT(gitreportLoaded(bool)));
|
connect(gitreport->webView, SIGNAL(loadFinished(bool)), gitreport, SLOT(gitreportLoaded(bool)));
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_GITREPORT */
|
#endif /* ENABLE_GITREPORT */
|
||||||
|
#ifdef OWN_GITHUB_TOKEN
|
||||||
|
else if (number == 2) {
|
||||||
|
ui->widget_auth->setHidden(true);
|
||||||
|
ui->widget_title->setHidden(false);
|
||||||
|
ui->textEdit->setHidden(false);
|
||||||
|
}
|
||||||
|
#endif /* OWN_GITHUB_TOKEN */
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* @brief contains information about enabled modules
|
* @brief contains information about enabled modules
|
||||||
*/
|
*/
|
||||||
bool modules[2];
|
bool modules[3];
|
||||||
/**
|
/**
|
||||||
* @brief class user interface
|
* @brief class user interface
|
||||||
*/
|
*/
|
||||||
|
@ -109,19 +109,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
|
@ -16,9 +16,11 @@
|
|||||||
|
|
||||||
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
||||||
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||||
#define SUBPROJECT_USE_QT5 "@USE_QT5@"
|
#define SUBPROJECT_DOCS "@BUILD_DOCS@"
|
||||||
#define SUBPROJECT_LIBRARY "@BUILD_AS_LIBRARY@"
|
#define SUBPROJECT_LIBRARY "@BUILD_AS_LIBRARY@"
|
||||||
#define SUBPROJECT_GITHUB_MODULE "@ENABLE_GITHUB@"
|
#define SUBPROJECT_GITHUB_MODULE "@ENABLE_GITHUB@"
|
||||||
#define SUBPROJECT_GITREPORT_MODULE "@ENABLE_GITREPORT@"
|
#define SUBPROJECT_GITREPORT_MODULE "@ENABLE_GITREPORT@"
|
||||||
|
#define SUBPROJECT_OWN_GITHUB_TOKEN "@OWN_GITHUB_TOKEN@"
|
||||||
|
#define SUBPROJECT_USE_QT5 "@USE_QT5@"
|
||||||
|
|
||||||
#endif /* VERSION_H */
|
#endif /* VERSION_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user