mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 23:47:21 +00:00
roll back
This commit is contained in:
parent
0aa162b71b
commit
0d26d6230e
@ -4,7 +4,6 @@ cmake_policy (SET CMP0003 OLD)
|
||||
cmake_policy (SET CMP0002 OLD)
|
||||
cmake_policy (SET CMP0011 NEW)
|
||||
cmake_policy (SET CMP0015 NEW)
|
||||
cmake_policy (SET CMP0028 OLD)
|
||||
|
||||
project (netctl-gui)
|
||||
set (PROJECT_AUTHOR "Evgeniy Alekseev")
|
||||
@ -51,23 +50,17 @@ else ()
|
||||
endif ()
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||
configure_file (${CMAKE_SOURCE_DIR}/reportabug.h ${CMAKE_SOURCE_DIR}/reportabug/src/config.h)
|
||||
|
||||
# resources
|
||||
set (PROJECT_LIBRARY netctlgui)
|
||||
set (PROJECT_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/resources)
|
||||
add_subdirectory (${PROJECT_RESOURCE_DIR})
|
||||
# 3rd party
|
||||
set (GUI_3RDPARTY reportabug)
|
||||
|
||||
# components
|
||||
if (BUILD_LIBRARY)
|
||||
add_subdirectory (${PROJECT_LIBRARY})
|
||||
endif()
|
||||
if (BUILD_GUI)
|
||||
foreach (3RDPARTY ${GUI_3RDPARTY})
|
||||
add_subdirectory (${3RDPARTY})
|
||||
endforeach ()
|
||||
add_subdirectory (gui)
|
||||
endif ()
|
||||
if (BUILD_DATAENGINE)
|
||||
|
@ -13,9 +13,6 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../${PROJECT_LIBRARY}/includ
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
link_directories (${PROJECT_LIBRARY}/src/lib)
|
||||
foreach (3RDPARTY ${GUI_3RDPARTY})
|
||||
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/../../${3RDPARTY}/src)
|
||||
endforeach ()
|
||||
|
||||
if (USE_QT5)
|
||||
find_package(Qt5Core REQUIRED)
|
||||
@ -25,6 +22,7 @@ if (USE_QT5)
|
||||
add_definitions(${Qt5Widgets_DEFINITIONS})
|
||||
add_definitions(${Qt5LinguistTools_DEFINITIONS})
|
||||
include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||
set (QT_NEEDED_LIBS ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES})
|
||||
qt5_wrap_cpp (MOC_SOURCES ${HEADERS})
|
||||
qt5_wrap_ui (UI_HEADERS ${FORMS})
|
||||
qt5_add_resources (QRC_SOURCES ${RESOURCES})
|
||||
@ -41,6 +39,7 @@ if (USE_QT5)
|
||||
else ()
|
||||
find_package (Qt4 REQUIRED)
|
||||
include (${QT_USE_FILE})
|
||||
set (QT_NEEDED_LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
||||
qt4_wrap_cpp (MOC_SOURCES ${HEADERS})
|
||||
qt4_wrap_ui (UI_HEADERS ${FORMS})
|
||||
qt4_add_resources (QRC_SOURCES ${RESOURCES})
|
||||
@ -57,6 +56,6 @@ else ()
|
||||
endif()
|
||||
|
||||
add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES} ${QRC_SOURCES} ${TRANSLATIONS})
|
||||
target_link_libraries (${SUBPROJECT} ${GUI_3RDPARTY} ${PROJECT_LIBRARY} ${Qt5Widgets_LIBRARIES} ${Qt5Core_LIBRARIES})
|
||||
target_link_libraries (${SUBPROJECT} ${PROJECT_LIBRARY} ${QT_NEEDED_LIBS})
|
||||
# install properties
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION bin)
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include <QProcess>
|
||||
|
||||
#include <netctlgui/netctlgui.h>
|
||||
#include <reportabug/reportabug.h>
|
||||
|
||||
#include "aboutwindow.h"
|
||||
#include "bridgewidget.h"
|
||||
@ -92,7 +91,6 @@ MainWindow::MainWindow(QWidget *parent,
|
||||
aboutWin = new AboutWindow(this, debug);
|
||||
errorWin = new ErrorWindow(this, debug);
|
||||
netctlAutoWin = new NetctlAutoWindow(this, debug, configuration);
|
||||
reportWin = new Reportabug(this, debug);
|
||||
// profile widgets
|
||||
generalWid = new GeneralWidget(this, configuration);
|
||||
ui->scrollAreaWidgetContents->layout()->addWidget(generalWid);
|
||||
@ -175,7 +173,6 @@ MainWindow::~MainWindow()
|
||||
delete errorWin;
|
||||
delete netctlAutoWin;
|
||||
delete settingsWin;
|
||||
delete reportWin;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@ -234,7 +231,6 @@ void MainWindow::createActions()
|
||||
connect(ui->actionNetctlAuto, SIGNAL(triggered(bool)), netctlAutoWin, SLOT(showWindow()));
|
||||
connect(ui->actionSettings, SIGNAL(triggered(bool)), settingsWin, SLOT(showWindow()));
|
||||
connect(ui->actionQuit, SIGNAL(triggered(bool)), this, SLOT(close()));
|
||||
connect(ui->actionReport, SIGNAL(triggered(bool)), reportWin, SLOT(showWindow()));
|
||||
|
||||
// actions menu
|
||||
connect(ui->menuActions, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
|
||||
|
@ -37,7 +37,6 @@ class NetctlProfile;
|
||||
class PasswdWidget;
|
||||
class PppoeWidget;
|
||||
class SettingsWindow;
|
||||
class Reportabug;
|
||||
class TunnelWidget;
|
||||
class TuntapWidget;
|
||||
class VlanWidget;
|
||||
@ -110,7 +109,6 @@ private:
|
||||
AboutWindow *aboutWin;
|
||||
ErrorWindow *errorWin;
|
||||
NetctlAutoWindow *netctlAutoWin;
|
||||
Reportabug *reportWin;
|
||||
PasswdWidget *passwdWid;
|
||||
SettingsWindow *settingsWin;
|
||||
BridgeWidget *bridgeWid;
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>477</width>
|
||||
<height>505</height>
|
||||
<width>479</width>
|
||||
<height>507</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -367,7 +367,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>477</width>
|
||||
<width>479</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -402,7 +402,6 @@
|
||||
<property name="title">
|
||||
<string>Help</string>
|
||||
</property>
|
||||
<addaction name="actionReport"/>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<addaction name="menuMenu"/>
|
||||
@ -563,22 +562,12 @@
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="icon">
|
||||
<iconset theme="help-about">
|
||||
<normaloff/>
|
||||
</iconset>
|
||||
<iconset theme="help-about"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReport">
|
||||
<property name="icon">
|
||||
<iconset theme="tools-report-bug"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Report a bug</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
|
@ -12,19 +12,17 @@ include_directories (${SUBPROJECT_INCLUDE_DIR}
|
||||
if (USE_QT5)
|
||||
find_package(Qt5Core REQUIRED)
|
||||
add_definitions(${Qt5Core_DEFINITIONS})
|
||||
qt5_wrap_cpp (MOC_SOURCES ${HEADERS})
|
||||
|
||||
include_directories (${Qt5Core_INCLUDE_DIRS})
|
||||
add_library (${SUBPROJECT} SHARED ${SOURCES} ${HEADERS} ${MOC_SOURCES})
|
||||
target_link_libraries (${SUBPROJECT} ${Qt5Core_LIBRARIES})
|
||||
set (QT_NEEDED_LIBS ${Qt5Core_LIBRARIES})
|
||||
qt5_wrap_cpp (MOC_SOURCES ${HEADERS})
|
||||
else ()
|
||||
find_package (Qt4 REQUIRED)
|
||||
include (${QT_USE_FILE})
|
||||
set (QT_NEEDED_LIBS ${QT_QTCORE_LIBRARY})
|
||||
qt4_wrap_cpp (MOC_SOURCES ${HEADERS})
|
||||
|
||||
add_library (${SUBPROJECT} SHARED ${SOURCES} ${HEADERS} ${MOC_SOURCES})
|
||||
target_link_libraries (${SUBPROJECT} ${QT_QTCORE_LIBRARY})
|
||||
endif()
|
||||
|
||||
add_library (${SUBPROJECT} SHARED ${SOURCES} ${HEADERS} ${MOC_SOURCES})
|
||||
target_link_libraries (${SUBPROJECT} ${QT_NEEDED_LIBS})
|
||||
# install properties
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION lib)
|
||||
|
@ -1,76 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <inconfig.h>
|
||||
|
||||
|
||||
/*
|
||||
* Main configuration
|
||||
*/
|
||||
// the owner of the source repository
|
||||
#define OWNER "arcan1s"
|
||||
// project name
|
||||
#define PROJECT "netctl-gui"
|
||||
// tags defaults
|
||||
#define TAG_TITLE "A new bug"
|
||||
#define TAG_BODY "Some error occurs"
|
||||
// the following tags will work only if user has push access
|
||||
// if they will be empty, they will be ignored
|
||||
#define TAG_ASSIGNEE "$OWNER"
|
||||
#define TAG_MILESTONE ""
|
||||
// comma separated
|
||||
#define TAG_LABELS ""
|
||||
|
||||
/*
|
||||
* Configuration of creating an issue using GitHub API
|
||||
*/
|
||||
// combobox text
|
||||
#define GITHUB_COMBOBOX "I want to report a bug using my GitHub account"
|
||||
// issues url; in the most cases do not touch it
|
||||
// available tags are $PROJECT, $OWNER
|
||||
#define ISSUES_URL "https://api.github.com/repos/$OWNER/$PROJECT/issues"
|
||||
|
||||
/*
|
||||
* Configuration of creating an issue using GitHub API and own token
|
||||
*
|
||||
* This module will be used instead of GitReport module.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Configuration of creating an issue using GitReports
|
||||
*
|
||||
* Please, visit https://gitreports.com/
|
||||
* and set up it for your repository.
|
||||
*/
|
||||
// combobox text
|
||||
#define GITREPORT_COMBOBOX "GitHub? I don't understand what do you want from me!"
|
||||
// public link; in the most cases do not touch it
|
||||
// available tags are $PROJECT, $OWNER
|
||||
#define PUBLIC_URL "https://gitreports.com/issue/$OWNER/$PROJECT"
|
||||
// captcha url; in the most cases do not touch it
|
||||
#define CAPTCHA_URL "https://gitreports.com/simple_captcha?code="
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
@ -1,73 +0,0 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
cmake_policy (SET CMP0003 OLD)
|
||||
cmake_policy (SET CMP0002 OLD)
|
||||
cmake_policy (SET CMP0011 NEW)
|
||||
cmake_policy (SET CMP0015 NEW)
|
||||
cmake_policy (SET CMP0048 OLD)
|
||||
|
||||
project (reportabug)
|
||||
|
||||
set (SUBPROJECT reportabug)
|
||||
set (SUBPROJECT_AUTHOR "Evgeniy Alekseev")
|
||||
set (SUBPROJECT_CONTACT "esalexeev@gmail.com")
|
||||
set (SUBPROJECT_LICENSE "LGPLv3")
|
||||
set (SUBPROJECT_VERSION_MAJOR 1)
|
||||
set (SUBPROJECT_VERSION_MINOR 0)
|
||||
set (SUBPROJECT_VERSION_PATCH 2)
|
||||
set (SUBPROJECT_VERSION ${SUBPROJECT_VERSION_MAJOR}.${SUBPROJECT_VERSION_MINOR}.${SUBPROJECT_VERSION_PATCH})
|
||||
string (TIMESTAMP CURRENT_DATE "%Y-%m-%d %H:%M" UTC)
|
||||
string (TIMESTAMP CURRENT_YEAR "%Y")
|
||||
|
||||
message (STATUS "Subproject: ${SUBPROJECT}")
|
||||
message (STATUS "Version: ${SUBPROJECT_VERSION}")
|
||||
message (STATUS "Build date: ${CURRENT_DATE}")
|
||||
|
||||
# install options
|
||||
set (BUILD_AS_LIBRARY ON CACHE BOOL "Build the application as a shared library")
|
||||
set (BUILD_DOCS OFF CACHE BOOL "Build developers documentation")
|
||||
set (ENABLE_GITHUB ON CACHE BOOL "Enable GitHub module")
|
||||
set (ENABLE_GITREPORT ON CACHE BOOL "Enable GitReport module")
|
||||
set (USE_QT5 ON CACHE BOOL "Use Qt5 instead of Qt4")
|
||||
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
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set (ADD_CXX_FLAGS "-Wall")
|
||||
set (CMAKE_CXX_FLAGS "-O0 ${ADD_CXX_FLAGS}")
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "-g -O0")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
|
||||
else ()
|
||||
message (STATUS "Unknown compiler")
|
||||
endif ()
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||
|
||||
# build
|
||||
# set directories
|
||||
set (SUBPROJECT_BINARY_DIR bin)
|
||||
set (SUBPROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
# executable path
|
||||
set (EXECUTABLE_OUTPUT_PATH ${SUBPROJECT_BINARY_DIR})
|
||||
|
||||
# additional targets
|
||||
set (TARGETS "")
|
||||
set (HEADERS "")
|
||||
|
||||
add_subdirectory (${SUBPROJECT_SOURCE_DIR})
|
||||
|
||||
if (BUILD_DOCS)
|
||||
include (docs.cmake)
|
||||
endif ()
|
||||
if (NOT BUILD_AS_LIBRARY)
|
||||
install (FILES ${SUBPROJECT}.desktop DESTINATION share/applications/)
|
||||
endif ()
|
@ -1,21 +0,0 @@
|
||||
# include files
|
||||
install (FILES ${HEADERS} DESTINATION include/${SUBPROJECT})
|
||||
|
||||
# doxygen documentation
|
||||
find_package (Doxygen)
|
||||
if (NOT DOXYGEN_FOUND)
|
||||
message (STATUS "WARNING: Doxygen not found - Reference manual will not be created")
|
||||
return ()
|
||||
endif ()
|
||||
|
||||
configure_file (doxygen.conf.in ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf)
|
||||
add_custom_target (oxygen-docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.conf)
|
||||
|
||||
# man pages
|
||||
# workaround for man pages
|
||||
set (MAN_DIR ${CMAKE_CURRENT_BINARY_DIR}/docs/man/man3)
|
||||
install (FILES ${MAN_DIR}/Reportabug.3 DESTINATION share/man/man3 RENAME ${SUBPROJECT}_Reportabug.3)
|
||||
install (FILES ${MAN_DIR}/GithubModule.3 DESTINATION share/man/man3 RENAME ${SUBPROJECT}_GithubModule.3)
|
||||
install (FILES ${MAN_DIR}/GitreportModule.3 DESTINATION share/man/man3 RENAME ${SUBPROJECT}_GitreportModule.3)
|
||||
# html docs
|
||||
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docs/html DESTINATION share/doc/${SUBPROJECT})
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Name=Report a bug
|
||||
Comment=A simple Qt application which allows users to create an issue for GitHub projects
|
||||
Exec=reportabug
|
||||
Icon=tools-report-bug
|
||||
Terminal=false
|
||||
Encoding=UTF-8
|
||||
Type=Application
|
||||
Categories=system
|
@ -1 +0,0 @@
|
||||
src/reportabug.h
|
@ -1,66 +0,0 @@
|
||||
# set files
|
||||
set (SOURCES ${SUBPROJECT_SOURCE_DIR}/main.cpp ${SUBPROJECT_SOURCE_DIR}/reportabug.cpp)
|
||||
set (HEADERS ${SUBPROJECT_SOURCE_DIR}/reportabug.h ${SUBPROJECT_SOURCE_DIR}/config.h)
|
||||
set (FORMS ${SUBPROJECT_SOURCE_DIR}/reportabug.ui)
|
||||
if (ENABLE_GITHUB OR USE_OWN_TOKEN)
|
||||
set (SOURCES ${SOURCES} ${SUBPROJECT_SOURCE_DIR}/githubmodule.cpp)
|
||||
set (HEADERS ${HEADERS} ${SUBPROJECT_SOURCE_DIR}/githubmodule.h)
|
||||
endif ()
|
||||
if (ENABLE_GITREPORT)
|
||||
set (SOURCES ${SOURCES} ${SUBPROJECT_SOURCE_DIR}/gitreportmodule.cpp)
|
||||
set (HEADERS ${HEADERS} ${SUBPROJECT_SOURCE_DIR}/gitreportmodule.h)
|
||||
endif ()
|
||||
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/inconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/inconfig.h)
|
||||
|
||||
# include_path
|
||||
include_directories (${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
if (USE_QT5)
|
||||
find_package (Qt5Core REQUIRED)
|
||||
find_package (Qt5Widgets REQUIRED)
|
||||
find_package (Qt5Network REQUIRED)
|
||||
add_definitions (${Qt5Core_DEFINITIONS})
|
||||
add_definitions (${Qt5Widgets_DEFINITIONS})
|
||||
add_definitions (${Qt5Network_DEFINITIONS})
|
||||
include_directories (${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
|
||||
set (QT_USED_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES} ${Qt5Network_LIBRARIES})
|
||||
if (ENABLE_GITREPORT)
|
||||
find_package (Qt5WebKit REQUIRED)
|
||||
find_package (Qt5WebKitWidgets REQUIRED)
|
||||
add_definitions (${Qt5WebKit_DEFINITIONS})
|
||||
add_definitions (${Qt5WebKitWidgets_DEFINITIONS})
|
||||
include_directories (${Qt5WebKit_INCLUDE_DIRS} ${Qt5WebKitWidgets_INCLUDE_DIRS})
|
||||
set (QT_USED_LIBRARIES ${QT_USED_LIBRARIES} ${Qt5WebKit_LIBRARIES} ${Qt5WebKitWidgets_LIBRARIES})
|
||||
endif ()
|
||||
qt5_wrap_cpp (MOC_SOURCES ${HEADERS})
|
||||
qt5_wrap_ui (UI_HEADERS ${FORMS})
|
||||
else ()
|
||||
set (QT_USED_COMPONENTS QtCore QtGui QtNetwork)
|
||||
if (ENABLE_GITREPORT)
|
||||
set (QT_USED_COMPONENTS ${QT_USED_COMPONENTS} QtWebKit)
|
||||
endif ()
|
||||
find_package(Qt4 COMPONENTS ${QT_USED_COMPONENTS} REQUIRED)
|
||||
include (${QT_USE_FILE})
|
||||
set (QT_USED_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTNETWORK_LIBRARY})
|
||||
if (ENABLE_GITREPORT)
|
||||
set (QT_USED_LIBRARIES ${QT_USED_LIBRARIES} ${QT_QTWEBKIT_LIBRARY})
|
||||
endif ()
|
||||
qt4_wrap_cpp (MOC_SOURCES ${HEADERS})
|
||||
qt4_wrap_ui (UI_HEADERS ${FORMS})
|
||||
endif()
|
||||
|
||||
if (BUILD_AS_LIBRARY)
|
||||
add_library (${SUBPROJECT} SHARED ${SOURCES} ${HEADERS} ${MOC_SOURCES} ${UI_HEADERS})
|
||||
else ()
|
||||
add_executable (${SUBPROJECT} ${UI_HEADERS} ${HEADERS} ${SOURCES} ${MOC_SOURCES})
|
||||
endif ()
|
||||
target_link_libraries (${SUBPROJECT} ${QT_USED_LIBRARIES})
|
||||
# install properties
|
||||
if (BUILD_AS_LIBRARY)
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION lib)
|
||||
else ()
|
||||
install (TARGETS ${SUBPROJECT} DESTINATION bin)
|
||||
endif ()
|
@ -1,76 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <inconfig.h>
|
||||
|
||||
|
||||
/*
|
||||
* Main configuration
|
||||
*/
|
||||
// the owner of the source repository
|
||||
#define OWNER "arcan1s"
|
||||
// project name
|
||||
#define PROJECT "netctl-gui"
|
||||
// tags defaults
|
||||
#define TAG_TITLE "A new bug"
|
||||
#define TAG_BODY "Some error occurs"
|
||||
// the following tags will work only if user has push access
|
||||
// if they will be empty, they will be ignored
|
||||
#define TAG_ASSIGNEE "$OWNER"
|
||||
#define TAG_MILESTONE ""
|
||||
// comma separated
|
||||
#define TAG_LABELS ""
|
||||
|
||||
/*
|
||||
* Configuration of creating an issue using GitHub API
|
||||
*/
|
||||
// combobox text
|
||||
#define GITHUB_COMBOBOX "I want to report a bug using my GitHub account"
|
||||
// issues url; in the most cases do not touch it
|
||||
// available tags are $PROJECT, $OWNER
|
||||
#define ISSUES_URL "https://api.github.com/repos/$OWNER/$PROJECT/issues"
|
||||
|
||||
/*
|
||||
* Configuration of creating an issue using GitHub API and own token
|
||||
*
|
||||
* This module will be used instead of GitReport module.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Configuration of creating an issue using GitReports
|
||||
*
|
||||
* Please, visit https://gitreports.com/
|
||||
* and set up it for your repository.
|
||||
*/
|
||||
// combobox text
|
||||
#define GITREPORT_COMBOBOX "GitHub? I don't understand what do you want from me!"
|
||||
// public link; in the most cases do not touch it
|
||||
// available tags are $PROJECT, $OWNER
|
||||
#define PUBLIC_URL "https://gitreports.com/issue/$OWNER/$PROJECT"
|
||||
// captcha url; in the most cases do not touch it
|
||||
#define CAPTCHA_URL "https://gitreports.com/simple_captcha?code="
|
||||
|
||||
|
||||
#endif /* CONFIG_H */
|
@ -1,215 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
/**
|
||||
* @file githubmodule.cpp
|
||||
* Source code of reportabug
|
||||
* @author Evgeniy Alekseev
|
||||
* @copyright LGPLv3
|
||||
* @bug https://github.com/arcan1s/reportabug/issues
|
||||
*/
|
||||
|
||||
#include "githubmodule.h"
|
||||
#include "reportabug.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QGridLayout>
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QUrl>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
/**
|
||||
* @class GithubModule
|
||||
*/
|
||||
/**
|
||||
* @fn GithubModule
|
||||
*/
|
||||
GithubModule::GithubModule(QWidget *parent, bool debugCmd)
|
||||
: QObject(parent),
|
||||
debug(debugCmd),
|
||||
mainWindow((Reportabug *)parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn ~GithubModule
|
||||
*/
|
||||
GithubModule::~GithubModule()
|
||||
{
|
||||
if (debug) qDebug() << "[GithubModule]" << "[~GithubModule]";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn prepareRequest
|
||||
*/
|
||||
QByteArray GithubModule::prepareRequest(const QString title, const QString body)
|
||||
{
|
||||
if (debug) qDebug() << "[GithubModule]" << "[prepareRequest]";
|
||||
if (debug) qDebug() << "[GithubModule]" << "[prepareRequest]" << ":" << "Title" << title;
|
||||
if (debug) qDebug() << "[GithubModule]" << "[prepareRequest]" << ":" << "Title" << body;
|
||||
|
||||
QStringList requestList;
|
||||
requestList.append(QString("\"title\":\"") + title + QString("\""));
|
||||
QString fixBody = body;
|
||||
fixBody.replace(QString("\n"), QString("<br>"));
|
||||
requestList.append(QString("\"body\":\"") + fixBody + QString("\""));
|
||||
if (!QString(TAG_ASSIGNEE).isEmpty())
|
||||
requestList.append(QString("\"assignee\":\"") + parseString(QString(TAG_ASSIGNEE)) + QString("\""));
|
||||
if (!QString(TAG_MILESTONE).isEmpty())
|
||||
requestList.append(QString("\"milestone\":") + QString(TAG_MILESTONE));
|
||||
if (!QString(TAG_LABELS).isEmpty()) {
|
||||
QStringList labels = QString(TAG_LABELS).split(QChar(','));
|
||||
for (int i=0; i<labels.count(); i++)
|
||||
labels[i] = QString("\"") + labels[i] + QString("\"");
|
||||
requestList.append(QString("\"labels\":[") + labels.join(QChar(',')) + QString("]"));
|
||||
}
|
||||
|
||||
QString request;
|
||||
request += QString("{");
|
||||
request += requestList.join(QChar(','));
|
||||
request += QString("}");
|
||||
|
||||
return request.toLocal8Bit();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn parseString
|
||||
*/
|
||||
QString GithubModule::parseString(QString line)
|
||||
{
|
||||
if (debug) qDebug() << "[GithubModule]" << "[parseString]";
|
||||
if (debug) qDebug() << "[GithubModule]" << "[parseString]" << ":" << "Parse line" << line;
|
||||
|
||||
if (line.contains(QString("$OWNER")))
|
||||
line = line.split(QString("$OWNER"))[0] +
|
||||
QString(OWNER) +
|
||||
line.split(QString("$OWNER"))[1];
|
||||
if (line.contains(QString("$PROJECT")))
|
||||
line = line.split(QString("$PROJECT"))[0] +
|
||||
QString(PROJECT) +
|
||||
line.split(QString("$PROJECT"))[1];
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn sendReportUsingGithub
|
||||
*/
|
||||
void GithubModule::sendReportUsingGithub(const QMap<QString, QString> info)
|
||||
{
|
||||
if (debug) qDebug() << "[GithubModule]" << "[sendReportUsingGithub]";
|
||||
|
||||
// authentication
|
||||
QString headerData;
|
||||
if (info.contains(QString("userdata")))
|
||||
headerData = QString("token ") + info[QString("userdata")];
|
||||
else {
|
||||
QString concatenated = info[QString("username")] + QString(":") + info[QString("password")];
|
||||
QByteArray userData = concatenated.toLocal8Bit().toBase64();
|
||||
headerData = QString("Basic ") + userData;
|
||||
}
|
||||
// text
|
||||
QByteArray text = prepareRequest(info[QString("title")], info[QString("body")]);
|
||||
QByteArray textSize = QByteArray::number(text.size());
|
||||
// sending request
|
||||
QNetworkRequest request = QNetworkRequest(parseString(QString(ISSUES_URL)));
|
||||
request.setRawHeader("Authorization", headerData.toLocal8Bit());
|
||||
request.setRawHeader("User-Agent", "reportabug");
|
||||
request.setRawHeader("Host", "api.github.com");
|
||||
request.setRawHeader("Accept", "*/*");
|
||||
request.setRawHeader("Content-Type", "application/vnd.github.VERSION.raw+json");
|
||||
request.setRawHeader("Content-Length", textSize);
|
||||
QNetworkAccessManager *manager = new QNetworkAccessManager;
|
||||
manager->post(request, text);
|
||||
disconnect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(githubFinished(QNetworkReply *)));
|
||||
connect(manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(githubFinished(QNetworkReply *)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn githubFinished
|
||||
*/
|
||||
void GithubModule::githubFinished(QNetworkReply *reply)
|
||||
{
|
||||
if (debug) qDebug() << "[GithubModule]" << "[githubFinished]";
|
||||
if (debug) qDebug() << "[GithubModule]" << "[githubFinished]" << ":" << "Error state" << reply->error();
|
||||
if (debug) qDebug() << "[GithubModule]" << "[githubFinished]" << ":" << "Reply size" << reply->readBufferSize();
|
||||
|
||||
bool state = true;
|
||||
QString answer = reply->readAll();
|
||||
if (debug) qDebug() << "[GithubModule]" << "[replyFinished]" << ":" << answer;
|
||||
QString messageBody, messageTitle;
|
||||
QMessageBox::Icon icon = QMessageBox::NoIcon;
|
||||
if (answer.contains(QString("\"html_url\":"))) {
|
||||
QString url;
|
||||
for (int i=0; i<answer.split(QChar(',')).count(); i++)
|
||||
if (answer.split(QChar(','))[i].split(QChar(':'))[0] == QString("\"html_url\"")) {
|
||||
url = answer.split(QChar(','))[i].split(QString("\"html_url\":"))[1].remove(QChar('"'));
|
||||
break;
|
||||
}
|
||||
messageBody += QString("%1\n").arg(QApplication::translate("Reportabug", "Message has been sended"));
|
||||
messageBody += QString("Url: %2").arg(url);
|
||||
messageTitle = QApplication::translate("Reportabug", "Done!");
|
||||
icon = QMessageBox::Information;
|
||||
state = true;
|
||||
}
|
||||
else if (answer.contains(QString("\"Bad credentials\""))) {
|
||||
messageBody += QApplication::translate("Reportabug", "Incorrect username or password");
|
||||
messageTitle = QApplication::translate("Reportabug", "Error!");
|
||||
icon = QMessageBox::Critical;
|
||||
state = false;
|
||||
}
|
||||
else {
|
||||
messageBody += QApplication::translate("Reportabug", "An error occurs");
|
||||
messageTitle = QApplication::translate("Reportabug", "Error!");
|
||||
icon = QMessageBox::Critical;
|
||||
state = false;
|
||||
}
|
||||
reply->deleteLater();
|
||||
|
||||
QMessageBox messageBox;
|
||||
messageBox.setText(messageTitle);
|
||||
messageBox.setInformativeText(messageBody);
|
||||
messageBox.setIcon(icon);
|
||||
messageBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Retry);
|
||||
messageBox.setDefaultButton(QMessageBox::Ok);
|
||||
QSpacerItem *horizontalSpacer = new QSpacerItem(400, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
QGridLayout *layout = (QGridLayout *)messageBox.layout();
|
||||
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
|
||||
int ret = messageBox.exec();
|
||||
|
||||
switch (ret) {
|
||||
case QMessageBox::Ok:
|
||||
if (state) mainWindow->close();
|
||||
break;
|
||||
case QMessageBox::Retry:
|
||||
if (state) mainWindow->externalUpdateTab();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
/**
|
||||
* @file githubmodule.h
|
||||
* Source code of reportabug
|
||||
* @author Evgeniy Alekseev
|
||||
* @copyright LGPLv3
|
||||
* @bug https://github.com/arcan1s/reportabug/issues
|
||||
*/
|
||||
|
||||
#ifndef GITHUBMODULE_H
|
||||
#define GITHUBMODULE_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
class Reportabug;
|
||||
class QNetworkReply;
|
||||
|
||||
/**
|
||||
* @brief The GithubModule class creates issue over GitHub.
|
||||
* @details The GitHub API is used for creating issue. Please visit
|
||||
* [the API page](https://developer.github.com/v3/issues/) for more details.
|
||||
* This module requires an users authentication. The typical POST request is:
|
||||
* @code
|
||||
* 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
|
||||
*
|
||||
* This module depends on QtNetwork module.
|
||||
*/
|
||||
class GithubModule : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief GithubModule class constructor
|
||||
* @param parent parent object
|
||||
* @param debugCmd show debug messages
|
||||
*/
|
||||
explicit GithubModule(QWidget *parent = 0,
|
||||
bool debugCmd = false);
|
||||
/**
|
||||
* @brief GithubModule class destructor
|
||||
*/
|
||||
~GithubModule();
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @brief method which creates an issue
|
||||
* @param info issue details. Needed keys are:
|
||||
* body (body of an issue),
|
||||
* password (GitHub password),
|
||||
* title (title of an issue),
|
||||
* userdata (given GitHub token, it is optional key),
|
||||
* username (GitHub user name),
|
||||
*/
|
||||
void sendReportUsingGithub(const QMap<QString, QString> info);
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief method which will be called after sending POST request
|
||||
* @param reply reply of the request
|
||||
*/
|
||||
void githubFinished(QNetworkReply *reply);
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief show debug messages
|
||||
*/
|
||||
bool debug;
|
||||
/**
|
||||
* @brief Reportabug class
|
||||
*/
|
||||
Reportabug *mainWindow;
|
||||
/**
|
||||
* @brief method which parses string and replace known tags
|
||||
* @param line source line
|
||||
* @return replaced line
|
||||
*/
|
||||
QString parseString(QString line);
|
||||
/**
|
||||
* @brief method which prepares raw issue details for sending request
|
||||
* @param title title of an issue
|
||||
* @param body body of an issue
|
||||
* @return JSON string
|
||||
*/
|
||||
QByteArray prepareRequest(const QString title, const QString body);
|
||||
};
|
||||
|
||||
|
||||
#endif /* GITHUBMODULE_H */
|
@ -1,189 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
/**
|
||||
* @file gitreportmodule.cpp
|
||||
* Source code of reportabug
|
||||
* @author Evgeniy Alekseev
|
||||
* @copyright LGPLv3
|
||||
* @bug https://github.com/arcan1s/reportabug/issues
|
||||
*/
|
||||
|
||||
#include "gitreportmodule.h"
|
||||
#include "reportabug.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QGridLayout>
|
||||
#include <QMessageBox>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QPushButton>
|
||||
#include <QUrl>
|
||||
#include <QWebElement>
|
||||
#include <QWebFrame>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
/**
|
||||
* @class GitreportModule
|
||||
*/
|
||||
/**
|
||||
* @fn GitreportModule
|
||||
*/
|
||||
GitreportModule::GitreportModule(QWidget *parent, bool debugCmd)
|
||||
: QObject(parent),
|
||||
debug(debugCmd),
|
||||
mainWindow((Reportabug *)parent)
|
||||
{
|
||||
webView = new QWebView();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn ~GitreportModule
|
||||
*/
|
||||
GitreportModule::~GitreportModule()
|
||||
{
|
||||
if (debug) qDebug() << "[GitreportModule]" << "[~GitreportModule]";
|
||||
|
||||
delete webView;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn sendReportUsingGitreport
|
||||
*/
|
||||
void GitreportModule::sendReportUsingGitreport(const QMap<QString, QString> info)
|
||||
{
|
||||
if (debug) qDebug() << "[GitreportModule]" << "[sendReportUsingGitreport]";
|
||||
|
||||
QWebElement document = webView->page()->mainFrame()->documentElement();
|
||||
QWebElement captchaKey = document.findFirst(QString("input#captcha"));
|
||||
QWebElement emailInput = document.findFirst(QString("input#email"));
|
||||
QWebElement textArea = document.findFirst(QString("textarea#details"));
|
||||
QWebElement usernameInput = document.findFirst(QString("input#name"));
|
||||
|
||||
// input
|
||||
usernameInput.setAttribute(QString("value"), info[QString("username")]);
|
||||
emailInput.setAttribute(QString("value"), info[QString("password")]);
|
||||
textArea.setPlainText(info[QString("body")]);
|
||||
captchaKey.setAttribute(QString("value"), info[QString("captcha")]);
|
||||
|
||||
// send request
|
||||
document.findFirst(QString("input[name=commit]")).evaluateJavaScript("this.click()");
|
||||
disconnect(webView, SIGNAL(loadFinished(bool)), this, SLOT(gitreportLoaded(bool)));
|
||||
disconnect(webView, SIGNAL(loadFinished(bool)), this, SLOT(gitreportFinished(bool)));
|
||||
connect(webView, SIGNAL(loadFinished(bool)), this, SLOT(gitreportFinished(bool)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn gitreportLoaded
|
||||
*/
|
||||
void GitreportModule::gitreportLoaded(const bool state)
|
||||
{
|
||||
if (debug) qDebug() << "[GitreportModule]" << "[gitreportLoaded]";
|
||||
if (debug) qDebug() << "[GitreportModule]" << "[gitreportLoaded]" << ":" << "State" << state;
|
||||
|
||||
if (state) {
|
||||
webView->setHidden(!debug);
|
||||
// captcha
|
||||
QWebElement document = webView->page()->mainFrame()->documentElement();
|
||||
QWebElement captchaImg = document.findFirst(QString("input#captcha_key"));
|
||||
QString captchaUrl = QString(CAPTCHA_URL) + captchaImg.attribute(QString("value"));
|
||||
QNetworkRequest request(captchaUrl);
|
||||
manager.get(request);
|
||||
disconnect(&manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(setCaptcha(QNetworkReply *)));
|
||||
connect(&manager, SIGNAL(finished(QNetworkReply *)), this, SLOT(setCaptcha(QNetworkReply *)));
|
||||
}
|
||||
else {
|
||||
QMessageBox messageBox;
|
||||
messageBox.setText(QApplication::translate("Reportabug", "Error!"));
|
||||
messageBox.setInformativeText(QApplication::translate("Reportabug", "An error occurs"));
|
||||
messageBox.setIcon(QMessageBox::Critical);
|
||||
messageBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Retry);
|
||||
messageBox.setDefaultButton(QMessageBox::Ok);
|
||||
QSpacerItem *horizontalSpacer = new QSpacerItem(400, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
QGridLayout *layout = (QGridLayout *)messageBox.layout();
|
||||
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
|
||||
messageBox.exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn gitreportFinished
|
||||
*/
|
||||
void GitreportModule::gitreportFinished(const bool state)
|
||||
{
|
||||
if (debug) qDebug() << "[GitreportModule]" << "[gitreportFinished]";
|
||||
if (debug) qDebug() << "[GitreportModule]" << "[gitreportFinished]" << ":" << "State" << state;
|
||||
|
||||
QString messageBody, messageTitle;
|
||||
QMessageBox::Icon icon = QMessageBox::NoIcon;
|
||||
if (state) {
|
||||
messageBody += QApplication::translate("Reportabug", "Message has been sended");
|
||||
messageTitle = QApplication::translate("Reportabug", "Done!");
|
||||
icon = QMessageBox::Information;
|
||||
}
|
||||
else {
|
||||
messageBody += QApplication::translate("Reportabug", "An error occurs");
|
||||
messageTitle = QApplication::translate("Reportabug", "Error!");
|
||||
icon = QMessageBox::Critical;
|
||||
}
|
||||
|
||||
QMessageBox messageBox;
|
||||
messageBox.setText(messageTitle);
|
||||
messageBox.setInformativeText(messageBody);
|
||||
messageBox.setIcon(icon);
|
||||
messageBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Retry);
|
||||
messageBox.setDefaultButton(QMessageBox::Ok);
|
||||
QSpacerItem *horizontalSpacer = new QSpacerItem(400, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
|
||||
QGridLayout *layout = (QGridLayout *)messageBox.layout();
|
||||
layout->addItem(horizontalSpacer, layout->rowCount(), 0, 1, layout->columnCount());
|
||||
int ret = messageBox.exec();
|
||||
|
||||
switch (ret) {
|
||||
case QMessageBox::Ok:
|
||||
if (state) mainWindow->close();
|
||||
break;
|
||||
case QMessageBox::Retry:
|
||||
if (state) mainWindow->externalUpdateTab();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn setCaptcha
|
||||
*/
|
||||
void GitreportModule::setCaptcha(QNetworkReply *reply)
|
||||
{
|
||||
if (debug) qDebug() << "[setCaptcha]" << "[setCaptcha]";
|
||||
if (debug) qDebug() << "[setCaptcha]" << "[setCaptcha]" << ":" << "Error state" << reply->error();
|
||||
if (debug) qDebug() << "[setCaptcha]" << "[setCaptcha]" << ":" << "Reply size" << reply->readBufferSize();
|
||||
|
||||
QByteArray answer = reply->readAll();
|
||||
QPixmap captcha;
|
||||
captcha.loadFromData(answer);
|
||||
mainWindow->setCaptchaImage(captcha);
|
||||
reply->deleteLater();
|
||||
}
|
@ -1,107 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
/**
|
||||
* @file gitreportmodule.h
|
||||
* Source code of reportabug
|
||||
* @author Evgeniy Alekseev
|
||||
* @copyright LGPLv3
|
||||
* @bug https://github.com/arcan1s/reportabug/issues
|
||||
*/
|
||||
|
||||
#ifndef GITREPORTMODULE_H
|
||||
#define GITREPORTMODULE_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
#include <QWebView>
|
||||
|
||||
class QNetworkAccessManager;
|
||||
class Reportabug;
|
||||
|
||||
/**
|
||||
* @brief The GitreportModule class creates issue over GitReports
|
||||
* @details This module uses [GitReport](https://gitreports.com/about) for
|
||||
* creating an issue. Please visit [this page](https://gitreports.com/)
|
||||
* and set up it for your repository.
|
||||
*
|
||||
* This module depends on QtWebKit and QtNetwork modules.
|
||||
*/
|
||||
class GitreportModule : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief GitreportModule class constructor
|
||||
* @param parent parent object
|
||||
* @param debugCmd show debug messages
|
||||
*/
|
||||
explicit GitreportModule(QWidget *parent = 0,
|
||||
bool debugCmd = false);
|
||||
/**
|
||||
* @brief GitreportModule class destructor
|
||||
*/
|
||||
~GitreportModule();
|
||||
/**
|
||||
* @brief Webkit item which is used for loading web page
|
||||
*/
|
||||
QWebView *webView;
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @brief method which creates an issue
|
||||
* @param info issue details. Needed keys are:
|
||||
* body (body of an issue)
|
||||
* password (user email),
|
||||
* username (user name),
|
||||
*/
|
||||
void sendReportUsingGitreport(const QMap<QString, QString> info);
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief method which will be called after sending request
|
||||
* @param bool state of web page loading
|
||||
*/
|
||||
void gitreportFinished(const bool state);
|
||||
/**
|
||||
* @brief method which will be called after loading of web page
|
||||
* @param bool state of web page loading
|
||||
*/
|
||||
void gitreportLoaded(const bool state);
|
||||
/**
|
||||
* @brief method which will be called after loading captcha image
|
||||
* @param reply reply of the request
|
||||
*/
|
||||
void setCaptcha(QNetworkReply *reply);
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief show debug messages
|
||||
*/
|
||||
bool debug;
|
||||
/**
|
||||
* @brief Reportabug class
|
||||
*/
|
||||
Reportabug *mainWindow;
|
||||
/**
|
||||
* @brief manager for getting captcha
|
||||
*/
|
||||
QNetworkAccessManager manager;
|
||||
};
|
||||
|
||||
|
||||
#endif /* GITREPORTMODULE_H */
|
@ -1,35 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef INCONFIG_H
|
||||
#define INCONFIG_H
|
||||
|
||||
|
||||
// DO NOT EDIT THIS FILE
|
||||
|
||||
/*
|
||||
* Main configuration
|
||||
*/
|
||||
// modules. Please use -DENABLE_GITHUB= and -DENABLE_GITREPORT= cmake flags
|
||||
#cmakedefine ENABLE_GITHUB
|
||||
#cmakedefine ENABLE_GITREPORT
|
||||
// please use -DOWN_GITHUB_TOKEN= cmake flag to define it
|
||||
// if it is empty, it will be ignored
|
||||
#cmakedefine OWN_GITHUB_TOKEN "@OWN_GITHUB_TOKEN@"
|
||||
|
||||
|
||||
#endif /* INCONFIG_H */
|
@ -1,44 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
/**
|
||||
* @file main.cpp
|
||||
* Source code of reportabug
|
||||
* @author Evgeniy Alekseev
|
||||
* @copyright LGPLv3
|
||||
* @bug https://github.com/arcan1s/reportabug/issues
|
||||
*/
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
#include "reportabug.h"
|
||||
#include "version.h"
|
||||
|
||||
/**
|
||||
* @fn main
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
/**
|
||||
* @return QApplication.exec()
|
||||
*/
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
Reportabug w(0, true);
|
||||
w.showWindow();
|
||||
return a.exec();
|
||||
}
|
@ -1,327 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
/**
|
||||
* @file reportabug.cpp
|
||||
* Source code of reportabug
|
||||
* @author Evgeniy Alekseev
|
||||
* @copyright LGPLv3
|
||||
* @bug https://github.com/arcan1s/reportabug/issues
|
||||
*/
|
||||
|
||||
#include "reportabug.h"
|
||||
#include "ui_reportabug.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QPushButton>
|
||||
|
||||
#include "config.h"
|
||||
#if defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN)
|
||||
#include "githubmodule.h"
|
||||
#endif /* defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN) */
|
||||
#ifdef ENABLE_GITREPORT
|
||||
#include "gitreportmodule.h"
|
||||
#endif /* ENABLE_GITREPORT */
|
||||
#include "version.h"
|
||||
|
||||
|
||||
/**
|
||||
* @class Reportabug
|
||||
*/
|
||||
/**
|
||||
* @fn Reportabug
|
||||
*/
|
||||
Reportabug::Reportabug(QWidget *parent, bool debugCmd)
|
||||
: QMainWindow(parent),
|
||||
debug(debugCmd),
|
||||
ui(new Ui::Reportabug)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
initModules();
|
||||
createComboBox();
|
||||
createActions();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn ~Reportabug
|
||||
*/
|
||||
Reportabug::~Reportabug()
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[~Reportabug]";
|
||||
|
||||
#if defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN)
|
||||
delete github;
|
||||
#endif /* defined(ENABLE_GITHUB) || defined(OWN_GITHUB_TOKEN) */
|
||||
#ifdef ENABLE_GITREPORT
|
||||
delete gitreport;
|
||||
#endif /* ENABLE_GITREPORT */
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn externalUpdateTab
|
||||
*/
|
||||
void Reportabug::externalUpdateTab()
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[externalUpdateTab]";
|
||||
|
||||
return updateTabs(ui->comboBox->currentIndex());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn setCaptchaImage
|
||||
*/
|
||||
void Reportabug::setCaptchaImage(QPixmap captcha)
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[setCaptchaImage]";
|
||||
|
||||
ui->label_captcha->setPixmap(captcha);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn createActions
|
||||
*/
|
||||
void Reportabug::createActions()
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[createActions]";
|
||||
|
||||
connect(ui->comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTabs(int)));
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Close), SIGNAL(clicked(bool)), this, SLOT(close()));
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked(bool)), this, SLOT(sendReport()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn createComboBox
|
||||
*/
|
||||
void Reportabug::createComboBox()
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[createComboBox]";
|
||||
|
||||
ui->comboBox->clear();
|
||||
if (modules[0])
|
||||
ui->comboBox->addItem(GITHUB_COMBOBOX);
|
||||
if (modules[1] || modules[2])
|
||||
ui->comboBox->addItem(GITREPORT_COMBOBOX);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn getNumberByIndex
|
||||
*/
|
||||
int Reportabug::getNumberByIndex(const int index)
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[getNumberByIndex]";
|
||||
if (debug) qDebug() << "[Reportabug]" << "[getNumberByIndex]" << ":" << "Index" << index;
|
||||
|
||||
if ((modules[0]) && (modules[1])) {
|
||||
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;
|
||||
else if (modules[0])
|
||||
return 0;
|
||||
else if (modules[1])
|
||||
return 1;
|
||||
else if (modules[2])
|
||||
return 2;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn initModules
|
||||
*/
|
||||
void Reportabug::initModules()
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[initModules]";
|
||||
|
||||
modules[0] = 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
|
||||
modules[0] = true;
|
||||
#endif /* ENABLE_GITHUB */
|
||||
#ifdef ENABLE_GITREPORT
|
||||
modules[1] = true;
|
||||
gitreport = new GitreportModule(this, debug);
|
||||
// 4 is a magic number. Seriously
|
||||
ui->verticalLayout->insertWidget(5, gitreport->webView);
|
||||
#endif /* ENABLE_GITREPORT */
|
||||
#ifdef OWN_GITHUB_TOKEN
|
||||
modules[2] = true;
|
||||
#endif /* OWN_GITHUB_TOKEN */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn keyPressEvent
|
||||
*/
|
||||
void Reportabug::keyPressEvent(QKeyEvent *pressedKey)
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[keyPressEvent]";
|
||||
|
||||
if (pressedKey->key() == Qt::Key_Escape)
|
||||
close();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn parseString
|
||||
*/
|
||||
QString Reportabug::parseString(QString line)
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[parseString]";
|
||||
if (debug) qDebug() << "[Reportabug]" << "[parseString]" << ":" << "Parse line" << line;
|
||||
|
||||
if (line.contains(QString("$OWNER")))
|
||||
line = line.split(QString("$OWNER"))[0] +
|
||||
QString(OWNER) +
|
||||
line.split(QString("$OWNER"))[1];
|
||||
if (line.contains(QString("$PROJECT")))
|
||||
line = line.split(QString("$PROJECT"))[0] +
|
||||
QString(PROJECT) +
|
||||
line.split(QString("$PROJECT"))[1];
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn sendReport
|
||||
*/
|
||||
void Reportabug::sendReport()
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[sendReport]";
|
||||
|
||||
int number = getNumberByIndex(ui->comboBox->currentIndex());
|
||||
QMap<QString, QString> info;
|
||||
info[QString("body")] = ui->textEdit->toPlainText();
|
||||
info[QString("captcha")] = ui->lineEdit_captcha->text();
|
||||
info[QString("password")] = ui->lineEdit_password->text();
|
||||
info[QString("title")] = ui->lineEdit_title->text();
|
||||
info[QString("username")] = ui->lineEdit_username->text();
|
||||
|
||||
if (number == -1)
|
||||
return;
|
||||
#ifdef ENABLE_GITHUB
|
||||
else if (number == 0)
|
||||
github->sendReportUsingGithub(info);
|
||||
#endif /* ENABLE_GITHUB */
|
||||
#ifdef ENABLE_GITREPORT
|
||||
else if (number == 1)
|
||||
gitreport->sendReportUsingGitreport(info);
|
||||
#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 */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn showWindow
|
||||
*/
|
||||
void Reportabug::showWindow()
|
||||
{
|
||||
externalUpdateTab();
|
||||
show();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @fn updateTabs
|
||||
*/
|
||||
void Reportabug::updateTabs(const int index)
|
||||
{
|
||||
if (debug) qDebug() << "[Reportabug]" << "[updateTabs]";
|
||||
if (debug) qDebug() << "[Reportabug]" << "[updateTabs]" << ":" << "Index" << index;
|
||||
|
||||
int number = getNumberByIndex(index);
|
||||
ui->lineEdit_username->clear();
|
||||
ui->lineEdit_password->clear();
|
||||
ui->lineEdit_title->setText(QString(TAG_TITLE));
|
||||
ui->textEdit->setPlainText(QString(TAG_BODY));
|
||||
ui->lineEdit_captcha->clear();
|
||||
|
||||
// it is out of conditional because I don't want a lot of ifdef/endif
|
||||
#ifdef ENABLE_GITREPORT
|
||||
gitreport->webView->setHidden(true);
|
||||
#endif /* ENABLE_GITREPORT */
|
||||
if (number == -1) {
|
||||
ui->widget_auth->setHidden(true);
|
||||
ui->widget_title->setHidden(true);
|
||||
ui->textEdit->setHidden(true);
|
||||
ui->widget_captcha->setHidden(true);
|
||||
}
|
||||
#ifdef ENABLE_GITHUB
|
||||
else if (number == 0) {
|
||||
ui->widget_auth->setHidden(false);
|
||||
ui->widget_title->setHidden(false);
|
||||
ui->textEdit->setHidden(false);
|
||||
ui->widget_captcha->setHidden(true);
|
||||
ui->label_password->setText(QApplication::translate("Reportabug", "Password"));
|
||||
ui->label_password->setToolTip(QApplication::translate("Reportabug", "GitHub account password"));
|
||||
ui->lineEdit_password->setPlaceholderText(QApplication::translate("Reportabug", "password"));
|
||||
ui->lineEdit_password->setEchoMode(QLineEdit::Password);
|
||||
}
|
||||
#endif /* ENABLE_GITHUB */
|
||||
#ifdef ENABLE_GITREPORT
|
||||
else if (number == 1) {
|
||||
ui->widget_auth->setHidden(false);
|
||||
ui->widget_title->setHidden(true);
|
||||
ui->textEdit->setHidden(false);
|
||||
ui->widget_captcha->setHidden(false);
|
||||
ui->label_password->setText(QApplication::translate("Reportabug", "Email"));
|
||||
ui->label_password->setToolTip(QApplication::translate("Reportabug", "Your email"));
|
||||
ui->lineEdit_password->setPlaceholderText(QApplication::translate("Reportabug", "email"));
|
||||
ui->lineEdit_password->setEchoMode(QLineEdit::Normal);
|
||||
|
||||
gitreport->webView->load(QUrl(parseString(QString(PUBLIC_URL))));
|
||||
disconnect(gitreport->webView, SIGNAL(loadFinished(bool)), gitreport, SLOT(gitreportLoaded(bool)));
|
||||
disconnect(gitreport->webView, SIGNAL(loadFinished(bool)), gitreport, SLOT(gitreportFinished(bool)));
|
||||
connect(gitreport->webView, SIGNAL(loadFinished(bool)), gitreport, SLOT(gitreportLoaded(bool)));
|
||||
}
|
||||
#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 */
|
||||
}
|
@ -1,140 +0,0 @@
|
||||
/***************************************************************************
|
||||
* This file is part of reportabug *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 3.0 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library. *
|
||||
***************************************************************************/
|
||||
/**
|
||||
* @file reportabug.h
|
||||
* Source code of reportabug
|
||||
* @author Evgeniy Alekseev
|
||||
* @copyright LGPLv3
|
||||
* @bug https://github.com/arcan1s/reportabug/issues
|
||||
*/
|
||||
|
||||
#ifndef REPORTABUG_H
|
||||
#define REPORTABUG_H
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QLocale>
|
||||
#include <QMainWindow>
|
||||
|
||||
|
||||
class GithubModule;
|
||||
class GitreportModule;
|
||||
|
||||
namespace Ui {
|
||||
class Reportabug;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The Reportabug class is a main class of the application
|
||||
*/
|
||||
class Reportabug : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Reportabug class constructor
|
||||
* @param parent parent object
|
||||
* @param debugCmd show debug messages
|
||||
*/
|
||||
explicit Reportabug(QWidget *parent = 0,
|
||||
bool debugCmd = false);
|
||||
/**
|
||||
* @brief Reportabug class destructor
|
||||
*/
|
||||
~Reportabug();
|
||||
/**
|
||||
* @brief method which is used for update tabs from external classes
|
||||
*/
|
||||
void externalUpdateTab();
|
||||
/**
|
||||
* @brief method which sets captcha image
|
||||
* @param captcha captcha image
|
||||
*/
|
||||
void setCaptchaImage(QPixmap captcha);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* @brief method which creates an issue
|
||||
*/
|
||||
void sendReport();
|
||||
/**
|
||||
* @brief method which updates text and shows window
|
||||
*/
|
||||
void showWindow();
|
||||
/**
|
||||
* @brief method which updates text
|
||||
* @param index the current combobox index
|
||||
*/
|
||||
void updateTabs(const int index);
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief show debug messages
|
||||
*/
|
||||
bool debug;
|
||||
/**
|
||||
* @brief contains information about enabled modules
|
||||
*/
|
||||
bool modules[3];
|
||||
/**
|
||||
* @brief class user interface
|
||||
*/
|
||||
Ui::Reportabug *ui;
|
||||
// modules
|
||||
/**
|
||||
* @brief GitHub module
|
||||
*/
|
||||
GithubModule *github;
|
||||
/**
|
||||
* @brief GitReports module
|
||||
*/
|
||||
GitreportModule *gitreport;
|
||||
/**
|
||||
* @brief method which creates the window actions
|
||||
*/
|
||||
void createActions();
|
||||
/**
|
||||
* @brief method which adds a text into combobox
|
||||
*/
|
||||
void createComboBox();
|
||||
/**
|
||||
* @brief method which parses combobox content
|
||||
* @param index the current combobox index
|
||||
* @return -1 if there is no any selected modules
|
||||
* @return 0 if the GitHub module is selected
|
||||
* @return 1 if the GitReports module is selected
|
||||
*/
|
||||
int getNumberByIndex(const int index);
|
||||
/**
|
||||
* @brief method which initializates modules
|
||||
*/
|
||||
void initModules();
|
||||
/**
|
||||
* @brief method which monitors on pressed keys
|
||||
* @param pressedKey the current pressed key
|
||||
*/
|
||||
void keyPressEvent(QKeyEvent *pressedKey);
|
||||
/**
|
||||
* @brief method which parses string and replace known tags
|
||||
* @param line source line
|
||||
* @return replaced line
|
||||
*/
|
||||
QString parseString(QString line);
|
||||
};
|
||||
|
||||
|
||||
#endif /* REPORTABUG_H */
|
@ -1,150 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Reportabug</class>
|
||||
<widget class="QMainWindow" name="Reportabug">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>541</width>
|
||||
<height>372</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Report a bug</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_auth" native="true">
|
||||
<layout class="QHBoxLayout" name="layout_auth">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_username">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_username">
|
||||
<property name="toolTip">
|
||||
<string>Your GitHub account</string>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>username</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_password">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_password">
|
||||
<property name="toolTip">
|
||||
<string>GitHub account password</string>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_title" native="true">
|
||||
<layout class="QHBoxLayout" name="layout_title">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_title">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_title">
|
||||
<property name="toolTip">
|
||||
<string>Title of the report</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="toolTip">
|
||||
<string>Text of the report</string>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_captcha" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_captcha">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_captcha">
|
||||
<property name="placeholderText">
|
||||
<string>captcha</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionClose">
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -1,26 +0,0 @@
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define NAME "Report a Bug"
|
||||
#define VERSION "@SUBPROJECT_VERSION@"
|
||||
#define AUTHOR "@SUBPROJECT_AUTHOR@"
|
||||
#define EMAIL "@SUBPROJECT_CONTACT@"
|
||||
#define LICENSE "@SUBPROJECT_LICENSE@"
|
||||
|
||||
#define HOMEPAGE "https://github.com/arcan1s/reportabug"
|
||||
#define REPOSITORY "https://github.com/arcan1s/reportabug"
|
||||
#define BUGTRACKER "https://github.com/arcan1s/reportabug/issues"
|
||||
|
||||
#define BUILD_DATE "@CURRENT_DATE@"
|
||||
#define DATE "2014-@CURRENT_YEAR@"
|
||||
|
||||
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
|
||||
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
|
||||
#define SUBPROJECT_DOCS "@BUILD_DOCS@"
|
||||
#define SUBPROJECT_LIBRARY "@BUILD_AS_LIBRARY@"
|
||||
#define SUBPROJECT_GITHUB_MODULE "@ENABLE_GITHUB@"
|
||||
#define SUBPROJECT_GITREPORT_MODULE "@ENABLE_GITREPORT@"
|
||||
#define SUBPROJECT_OWN_GITHUB_TOKEN "@OWN_GITHUB_TOKEN@"
|
||||
#define SUBPROJECT_USE_QT5 "@USE_QT5@"
|
||||
|
||||
#endif /* VERSION_H */
|
@ -990,10 +990,6 @@
|
||||
<source>read configuration from this file</source>
|
||||
<translation>read configuration from this file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report a bug</source>
|
||||
<translation>Report a bug</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MobileWidget</name>
|
||||
|
@ -723,292 +723,287 @@
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="490"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="478"/>
|
||||
<source>Netctl GUI</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="522"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="509"/>
|
||||
<source>Connect to profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="403"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="516"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="513"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="529"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="400"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="513"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="500"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="516"/>
|
||||
<source>Name</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="404"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="515"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="401"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="502"/>
|
||||
<source>Description</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="405"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="517"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="517"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="531"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="402"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="514"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="504"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="518"/>
|
||||
<source>Status</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="586"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1200"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="495"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="502"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="518"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="536"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="583"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1197"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="483"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="490"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="505"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="523"/>
|
||||
<source>Refresh</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="519"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="537"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="506"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="524"/>
|
||||
<source>Ctrl+R</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="520"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="507"/>
|
||||
<source>Restart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="777"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1398"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1403"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="521"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="538"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="774"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1395"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1400"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="508"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="525"/>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="526"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="513"/>
|
||||
<source>Create a new profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="523"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="510"/>
|
||||
<source>Profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="501"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="524"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="489"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="511"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="509"/>
|
||||
<source>Report a bug</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="525"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="512"/>
|
||||
<source>Save</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="539"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="526"/>
|
||||
<source>Connect to Wi-Fi</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="527"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="514"/>
|
||||
<source>Please install 'wpa_supplicant' before using it</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="508"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="496"/>
|
||||
<source>About</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="510"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="497"/>
|
||||
<source>netctl-auto is running</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="511"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="498"/>
|
||||
<source>Show</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="518"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="533"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="515"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="520"/>
|
||||
<source>Signal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="519"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="535"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="516"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="522"/>
|
||||
<source>Security</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="540"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="527"/>
|
||||
<source>Menu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="541"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="528"/>
|
||||
<source>Actions</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="542"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="529"/>
|
||||
<source>Help</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="491"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="479"/>
|
||||
<source>Settings</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="492"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="480"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="493"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="481"/>
|
||||
<source>Quit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="494"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="482"/>
|
||||
<source>Ctrl+Q</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="449"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="589"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="608"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="496"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="446"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="586"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="605"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="484"/>
|
||||
<source>Start profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="590"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="497"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="587"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="485"/>
|
||||
<source>Restart profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="458"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="592"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="616"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="498"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="455"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="589"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="613"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="486"/>
|
||||
<source>Enable profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="594"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="499"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="591"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="487"/>
|
||||
<source>Edit profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="596"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="500"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="506"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="593"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="488"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="494"/>
|
||||
<source>Remove profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="503"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="491"/>
|
||||
<source>Load profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="504"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="492"/>
|
||||
<source>Save profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="505"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="493"/>
|
||||
<source>Start Wi-Fi</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="507"/>
|
||||
<location filename="../../../build/gui/src/ui_mainwindow.h" line="495"/>
|
||||
<source>netctl-auto</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="150"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="148"/>
|
||||
<source>Ready</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="428"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="474"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="545"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="425"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="471"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="542"/>
|
||||
<source>Updated</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="444"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="603"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="441"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="600"/>
|
||||
<source>Stop profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="454"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="612"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="451"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="609"/>
|
||||
<source>Disable profile</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="561"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1209"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="558"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1206"/>
|
||||
<source>Stop WiFi</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="565"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="570"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1203"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1213"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1218"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="562"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="567"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1200"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1210"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1215"/>
|
||||
<source>Start WiFi</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="669"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="693"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="697"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="718"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="742"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="746"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1112"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1183"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1289"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1344"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1348"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="666"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="690"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="694"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="715"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="739"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="743"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1109"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1180"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1286"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1341"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1345"/>
|
||||
<source>Done</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="671"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="691"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="699"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="720"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="740"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="748"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1114"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1185"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1291"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1342"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1350"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="668"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="688"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="696"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="717"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="737"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="745"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1111"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1182"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1288"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1339"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1347"/>
|
||||
<source>Error</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="772"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1394"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="769"/>
|
||||
<location filename="../../gui/src/mainwindow.cpp" line="1391"/>
|
||||
<source>Stop</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -989,10 +989,6 @@
|
||||
<source>read configuration from this file</source>
|
||||
<translation>прочитать настройки из данного файла</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Report a bug</source>
|
||||
<translation>Сообщить о баге</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MobileWidget</name>
|
||||
|
Loading…
Reference in New Issue
Block a user