fix build

This commit is contained in:
Andrei Yankovich 2022-01-14 19:55:51 +03:00
parent 4486fd96dd
commit 4dcdd56b5b
39 changed files with 1345 additions and 163 deletions

View File

@ -1,6 +1,6 @@
#
# Copyright (C) 2020-2021 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Copyright (C) 2020-2022 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
@ -33,46 +33,43 @@ include(submodules/CMake/QuasarApp.cmake)
updateGitVars()
set(DoctorPill_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
set(DoctorPill_PACKAGE_ID "quasarapp.core.DoctorPill")
if (NOT DEFINED DoctorPill_TESTS)
set(DoctorPill_TESTS ON)
option(DOCTOR_PILL_GUI "Enable gui qml model for build" OFF)
if (NOT DEFINED DOCTOR_PILL_TESTS)
set(DOCTOR_PILL_TESTS ON)
if (DEFINED TARGET_PLATFORM_TOOLCHAIN)
if (${TARGET_PLATFORM_TOOLCHAIN} STREQUAL "wasm32")
set(DoctorPill_TESTS OFF)
set(DOCTOR_PILL_TESTS OFF)
set(DOCTOR_EXAMPLE_TESTS OFF)
endif()
endif()
if (ANDROID OR IOS)
set(DoctorPill_TESTS OFF)
set(DOCTOR_PILL_TESTS OFF)
set(DOCTOR_EXAMPLE_TESTS OFF)
endif()
if (NOT QT_VERSION_MAJOR)
set(DoctorPill_TESTS OFF)
endif()
endif()
if (NOT DEFINED DoctorPill_EXAMPLE)
set(DoctorPill_EXAMPLE ON)
if (NOT DEFINED DOCTOR_EXAMPLE_TESTS)
set(DOCTOR_EXAMPLE_TESTS ON)
if (NOT QT_VERSION_MAJOR)
set(DoctorPill_EXAMPLE OFF)
set(DOCTOR_EXAMPLE_TESTS OFF)
endif()
endif()
initAll()
updateGitVars()
set(DOCTOR_PILL_VERSION "0.${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}")
add_subdirectory(src/Library)
if (DEFINED DoctorPill_EXAMPLE)
if (DEFINED DOCTOR_EXAMPLE_TESTS)
add_subdirectory(src/Example)
endif()
if (DoctorPill_TESTS)
if (DOCTOR_PILL_TESTS)
add_subdirectory(tests)
else()
message("The ${PROJECT_NAME} tests is disabled.")

View File

@ -1,6 +1,6 @@
#
# Copyright (C) 2021-2021 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Copyright (C) 2021-2022 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
@ -8,7 +8,6 @@
cmake_minimum_required(VERSION 3.14)
set(CURRENT_PROJECT "${PROJECT_NAME}Eaxample")
option(SIGN_APP "This option enable od disabled sign apk and aab files" ON)
file(GLOB SOURCE_CPP
"*.cpp"
@ -52,79 +51,6 @@ target_include_directories(${CURRENT_PROJECT} PRIVATE ${PRIVATE_INCUDE_DIR})
SET(TARGET_DIR "${CMAKE_SOURCE_DIR}/Distro")
file(MAKE_DIRECTORY ${TARGET_DIR})
if (ANDROID)
set(ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android CACHE INTERNAL "")
set(ENV{ANDROID_API_VERSION} 31)
set(ANDROID_API_VERSION $ENV{ANDROID_API_VERSION})
set(OPENSSL_ROOT_PATH "$ENV{OPENSSL_ROOT_DIR}")
set(DoctorPill_EXTRA_LIBS
${PROJECT_NAME}
# libName
)
# find_package(Qt${QT_VERSION_MAJOR} COMPONENTS AndroidExtras REQUIRED)
# target_link_libraries(${CURRENT_PROJECT} PRIVATE Qt${QT_VERSION_MAJOR}::AndroidExtras)
if (SIGN_APP)
message("SIGN_APP")
addDeploySignedAPK(${CURRENT_PROJECT}
"${CMAKE_CURRENT_LIST_DIR}/android"
"QuasarAppProject"
"${SIGPATH}/quasarapp.keystore"
"${SIGPASS_QUASARAPP}"
"${TARGET_DIR}"
"${DoctorPill_EXTRA_LIBS}")
else()
message("NO_SIGN_APP")
addDeployAPK(${CURRENT_PROJECT}
"${CMAKE_CURRENT_LIST_DIR}/android"
"${TARGET_DIR}"
"${DoctorPill_EXTRA_LIBS}")
endif()
set(manifest_file "${CMAKE_CURRENT_SOURCE_DIR}/android/AndroidManifest.xml")
configure_file("${manifest_file}.in" ${manifest_file} @ONLY)
set(gradle_file "${CMAKE_CURRENT_SOURCE_DIR}/android/build.gradle")
configure_file("${gradle_file}.in" ${gradle_file} @ONLY)
file(GLOB java_files
"android/src/com/quasarapp/androidtools/*.java"
"android/*.xml"
"android/*.gradle"
"android/gradlew"
"android/gradle.*"
)
add_custom_target(${name}Android
SOURCES ${java_files}
)
elseif(IOS)
# set_xcode_property(${CURRENT_PROJECT} PRODUCT_BUNDLE_IDENTIFIER ${CHEATCARD_PACKAGE_ID} All)
set_target_properties(${CURRENT_PROJECT} PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER ${DoctorPill_PACKAGE_ID}
MACOSX_BUNDLE_BUNDLE_VERSION ${DoctorPill_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${DoctorPill_VERSION}
)
else()
# Desctop deploying
message(GIT_COMMIT_COUNT = ${GIT_COMMIT_COUNT})
set(DeployFile "${CMAKE_CURRENT_SOURCE_DIR}/Deploy/DoctorPill.json")
configure_file("${DeployFile}.in" ${DeployFile} @ONLY)
addDeployFromCustomFile("DoctorPill" ${DeployFile})
endif()
if(QT_VERSION_MAJOR EQUAL 6)
# Add This line if your project use the Quick module
# qt_import_qml_plugins(${CURRENT_PROJECT})

View File

@ -13,7 +13,7 @@
],
"extraLib": "crypto",
"targetDir": "/home/andrei/gitHub/DoctorPill/Distro",
"deployVersion": "0.1.2f207ec",
"deployVersion": "0.2.4486fd9",
}

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2021-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2021-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#

View File

@ -1,38 +1,40 @@
#
# Copyright (C) 2020-2021 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Copyright (C) 2020-2022 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
cmake_minimum_required(VERSION 3.14)
add_definitions(-DDoctorPill_LIBRARY)
add_definitions(-DDOCTOR_PILL_LIBRARY)
file(GLOB SOURCE_CPP
"*DoctorPill/*.cpp"
"private/*.cpp"
"*.cpp"
"*DoctorPillCore/*.cpp"
)
if (${QT_VERSION_MAJOR})
if (DOCTOR_PILL_GUI)
file(GLOB SOURCE_CPP_GUI
"*DoctorPillGui/*.cpp"
)
file(GLOB SOURCE_QRC
"*.qrc"
"DoctorPill/*.qrc"
"private/*.qrc"
"DoctorPillCore/*.qrc"
)
endif()
set(PUBLIC_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(PRIVATE_INCUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/private")
add_library(${PROJECT_NAME} ${SOURCE_CPP} ${SOURCE_QRC})
add_library(${PROJECT_NAME} ${SOURCE_CPP} ${SOURCE_QRC} ${SOURCE_CPP_GUI})
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
if (${QT_VERSION_MAJOR})
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
endif()
target_include_directories(${PROJECT_NAME} PUBLIC ${PUBLIC_INCUDE_DIR})
target_include_directories(${PROJECT_NAME} PRIVATE ${PRIVATE_INCUDE_DIR})

View File

@ -1,7 +1,7 @@
<RCC>
<qresource prefix="/">
<file>DoctorPillModule/qmldir</file>
<file>DoctorPillModule/DoctorPill.qml</file>
<file>DoctorPillModule/DoctorView.qml</file>
</qresource>
<qresource prefix="/DoctorPillTr">
<file>languages/en.qm</file>

View File

@ -1,16 +0,0 @@
//#
//# Copyright (C) 2021-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#include "DoctorPill_global.h"
inline void initDoctorPillResources() { Q_INIT_RESOURCE(DoctorPill); }
namespace DoctorPill {
bool DoctorPill_EXPORT init();
};

View File

@ -0,0 +1,79 @@
/*
* Copyright (C) 2018-2022 QuasarApp.
* Distributed under the GPLv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#include "ipill.h"
#include "doctor.h"
namespace DP {
Doctor::Doctor(const QList<QSharedPointer<iPill> > &base) {
_pillsData = base;
}
void Doctor::diagnostic(bool fix) const {
QList<QSharedPointer<iPill> > failed;
QList<QSharedPointer<iPill> > detected;
QList<QSharedPointer<iPill> > fixedSuccessful;
for (const auto &pill: _pillsData) {
if (pill->diagnostic()) {
if (fix) {
if (!pill->fix()) {
failed.push_back(pill);
} else {
fixedSuccessful.push_back(pill);
}
} else {
detected.push_back(pill);
}
}
}
if (failed.size()) {
emit sigFixesFailed(failed);
}
if (detected.count()) {
emit sigTroubleDetected(detected);
}
if (fixedSuccessful.count()) {
emit sigFixesFinishedSuccessful(fixedSuccessful);
}
}
void Doctor::fix(const QList<QSharedPointer<iPill> > &pills) const {
QList<QSharedPointer<iPill> > failed;
QList<QSharedPointer<iPill> > fixedSuccessful;
for (const auto &pill: pills) {
if (pill->diagnostic()) {
if (!pill->fix()) {
failed.push_back(pill);
} else {
fixedSuccessful.push_back(pill);
}
}
}
if (failed.size()) {
emit sigFixesFailed(failed);
}
if (fixedSuccessful.count()) {
emit sigFixesFinishedSuccessful(fixedSuccessful);
}
}
void Doctor::addPill(const QSharedPointer<iPill> &pill) {
_pillsData.push_back(pill);
}
}

View File

@ -0,0 +1,95 @@
/*
* Copyright (C) 2018-2022 QuasarApp.
* Distributed under the GPLv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#ifndef DOCTOR_H
#define DOCTOR_H
#include "ipill.h"
#include "doctorpill_global.h"
#include <QSharedPointer>
namespace DP {
/**
* @brief The Doctor class is class that execute pills objects.
* The Doctor check issue that will be executed and if the issue realy then execute fix.
* @warning This is dangerous system because you may create bug in pill and doctor that will execute this pill may broke users app.
* @see iPill
*/
class DOCTOR_PILL_EXPORT Doctor: public QObject
{
Q_OBJECT
public:
/**
* @brief Doctor This is base contructor of doctor calss.
* @param base This is list of known issues.
*/
Doctor(const QList<QSharedPointer<iPill>> &base);
/**
* @brief diagnostic This method run full diagnostic of this application.
* If the @a fix is true then doctor try fix the foundet issues.
* If the @a fix value if false then the Doctor emit the sigTroubleDetected signal.
* @param fix set this argument to tru if you want fix all foundet issues.
* @see Doctor::fix
* @see Doctor::addPill
* @see Doctor::sigFixesFailed
* @see Doctor::sigFixesFinishedSuccessful
*/
void diagnostic(bool fix = false) const;
/**
* @brief fix This method try run fixes by input pills.
* @note All fixes will be checked before execute fix.
* @param pills This is list of fixes that will be executed.
* @see Doctor::diagnostic
* @see Doctor::addPill
* @see Doctor::sigFixesFailed
* @see Doctor::sigFixesFinishedSuccessful
*/
void fix(const QList<QSharedPointer<iPill>>& pills) const;
/**
* @brief addPill This method add new pill object to doctor library
* @param pill This is pill object.
* @see Doctor::diagnostic
* @see Doctor::fix
* @see Doctor::sigFixesFailed
* @see Doctor::sigFixesFinishedSuccessful
*/
void addPill(const QSharedPointer<iPill>& pill);
signals:
/**
* @brief sigTroubleDetected This signal will emited when The doctor object found issues in this application.
* @param issues this is list of detected issues.
* @see Doctor::diagnostic
* @see Doctor::fix
* @see Doctor::sigFixesFailed
* @see Doctor::sigFixesFinishedSuccessful
*/
void sigTroubleDetected(QList<QSharedPointer<iPill>> issues) const;
/**
* @brief sigFixesFailed This signal emited when the doctor can't fix foundet issues.
* @param issues This is list of the unfixable issues.
*/
void sigFixesFailed(QList<QSharedPointer<iPill>> issues) const;
/**
* @brief sigFixesFinishedSuccessful This signal emited when the doctor fix foundet issues successfull.
* @param issues This is list of the fixed issues.
*/
void sigFixesFinishedSuccessful(QList<QSharedPointer<iPill>> issues) const;
private:
QList<QSharedPointer<iPill>> _pillsData;
};
}
#endif // DOCTOR_H

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2018-2022 QuasarApp.
* Distributed under the GPLv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#include "doctortest.h"
#include "ipill.h"
namespace DP {
DoctorTest::DoctorTest() {
}
bool DoctorTest::test(const QSharedPointer<iPill> &pill,
bool appIsBroken) const {
if (pill->diagnostic() != appIsBroken) {
return false;
}
if (appIsBroken && !pill->fix()) {
return false;
}
return pill->diagnostic();
}
}

View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2018-2022 QuasarApp.
* Distributed under the GPLv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#ifndef DOCTORTEST_H
#define DOCTORTEST_H
#include <QSharedPointer>
#include "doctorpill_global.h"
namespace DP {
class iPill;
class Doctor;
/**
* @brief The DoctorTest class This class contains auto tests for pills objects.
* @see Doctor class for get more information.
*/
class DOCTOR_PILL_EXPORT DoctorTest
{
public:
DoctorTest();
/**
* @brief test This method run simple test for the pill object.
* **Test algorithm**
*
* 1. Doctor run the iPill::diagnostic method.
* 2. If an @a appIsBroken is false then diagnostic method should return true
* 3. If an @a appIsBroken is true then diagnostic method should return true.
* 4. Doctor run the fix and check diagnostic method again.
* 5. The diagnostic method should return false value.
*
* @param pill This is checked pill for solve issue.
* @param appIsBroken bollean variable that should be true if app is broken else false.
* @return true if test passed elase false.
*/
bool test(const QSharedPointer<iPill>& pill, bool appIsBroken) const;
};
}
#endif // DOCTORTEST_H

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2018-2022 QuasarApp.
* Distributed under the GPLv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#include "ipill.h"
namespace DP {
iPill::iPill()
{
}
}

View File

@ -0,0 +1,74 @@
/*
* Copyright (C) 2018-2022 QuasarApp.
* Distributed under the GPLv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
#ifndef IPILL_H
#define IPILL_H
#include <QString>
#include "doctorpill_global.h"
namespace DP {
/**
* @brief The iPill class is base interface for the pill object.
* The Pill object is independet tool that must be fix one issue for runned application.
*
* ## For Example:
*
* You has a sume bug, but you don't known about this bug.
* This big broken the database for your users, but you still don't known about this.
* You found this bug and create new patch for fix it, but databae of your users alredy broken, and you users can't fix this issues yasterself.
* So you can create a pill for fix broked database and delive to your users for fix thes issue.
*
* The Pill object structure should be has:
* * The Action that should be check if contains this issue or not ...
* * The Action taht should be fix issue.
* * Description of the issue.
* * Name of the issue.
*
* * @see iPill
*/
class DOCTOR_PILL_EXPORT iPill
{
public:
iPill();
/**
* @brief name This method should be return name of this pill.
* @return name of this pill.
*/
virtual QString name() const = 0;
/**
* @brief description This method should be return dital description of the issue that this pill will fix after execute (accept).
* @return string valeu with description.
*/
virtual QString description() const = 0;
protected:
/**
* @brief diagnostic This method execute action that should be check if exits issues or not.
* @note This method will executed only on the Doctor object.
* @return true if the issues is detected.
*/
virtual bool diagnostic() const = 0;
/**
* @brief fix This method should be fix detected issue.
* @return true if the issue fixes successful else false
*/
virtual bool fix() const = 0;
friend class Doctor;
friend class DoctorTest;
};
}
#endif // IPILL_H

View File

@ -0,0 +1,98 @@
//#
//# Copyright (C) 2021-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#include "pillsmodel.h"
#include <QHash>
namespace DP {
PillsModel::PillsModel(const QList<QSharedPointer<iPill>> &base):
_doctor(base)
{
}
int PillsModel::rowCount(const QModelIndex &) const {
return _viewData.count();
}
QVariant PillsModel::data(const QModelIndex &index, int role) const {
if (index.row() < 0 || index.row() >= rowCount()) {
return "";
}
Issue item = *std::next(_viewData.begin(), index.row());
if (!item._pill) {
return "Internal Error";
}
if (role == Roles::Name) {
return item._pill->name();
}
if (role == Roles::Description) {
return item._pill->description();
}
if (role == Roles::Status) {
return item._status;
}
return "Unknown";
}
QHash<int, QByteArray> PillsModel::roleNames() const {
QHash<int, QByteArray> roles;
roles[Roles::Name] = "issueName";
roles[Roles::Description] = "issueDescription";
roles[Roles::Status] = "issueStatus";
return roles;
}
void PillsModel::usePill(QString pillName) {
auto pill = _viewData.value(pillName, {});
if (!pill._pill)
return;
_doctor.fix({pill._pill});
}
void PillsModel::diagnostic() {
_doctor.diagnostic();
}
void PillsModel::handleFixFailed(QList<QSharedPointer<iPill>> failed) {
for (const auto &pill : qAsConst(failed)) {
_viewData[pill->name()]._status = static_cast<int>(IssueStatus::Failed);
}
}
void PillsModel::handleFixSuccessful(QList<QSharedPointer<iPill>> successful) {
for (const auto &pill : qAsConst(successful)) {
_viewData[pill->name()]._status = static_cast<int>(IssueStatus::Solved);
}
}
void PillsModel::handleBugDetected(QList<QSharedPointer<iPill>> bugDetected) {
beginResetModel();
_viewData.clear();
for (const auto &pill : qAsConst(bugDetected)) {
_viewData[pill->name()] = Issue{0, pill};
}
endResetModel();
}
}

View File

@ -0,0 +1,62 @@
//#
//# Copyright (C) 2021-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#ifndef PILLSMODEL_H
#define PILLSMODEL_H
#include <QAbstractListModel>
#include <DoctorPillCore/doctor.h>
namespace DP {
struct Issue {
int _status = 0;
QSharedPointer<iPill> _pill = nullptr;
};
/**
* @brief The PillsModel class This is gui model of available pills.
*/
class PillsModel: public QAbstractListModel
{
Q_OBJECT
enum Roles {
Name = Qt::UserRole,
Description,
Status
};
enum IssueStatus {
Detected,
Solved,
Failed
};
public:
PillsModel(const QList<QSharedPointer<iPill>> &base);
void addPill(const QSharedPointer<iPill>& pill);
int rowCount(const QModelIndex &parent = {}) const override;
QVariant data(const QModelIndex &index, int role) const override;
QHash<int, QByteArray> roleNames() const override;
Q_INVOKABLE void usePill(QString pillName);
Q_INVOKABLE void diagnostic();
private slots:
void handleFixFailed(QList<QSharedPointer<iPill>>);
void handleFixSuccessful(QList<QSharedPointer<iPill>>);
void handleBugDetected(QList<QSharedPointer<iPill>>);
private:
Doctor _doctor;
QHash<QString, Issue> _viewData;
};
}
#endif // PILLSMODEL_H

View File

@ -1,12 +0,0 @@
//#
//# Copyright (C) 2021-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
import QtQuick 2.15
Item {
}

View File

@ -0,0 +1,262 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls.Material 2.15
import QtQuick.Layouts 1.15
import "Style"
CPage {
id: root;
property var model : null
implicitHeight: 0x0
title: qsTr("Doctor page. The Doctor can help you to fix your app.");
ColumnLayout {
Label {
id: atansionMsg
text: qsTr("Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.");
}
Label {
id: descriptionMsg
text: qsTr("This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue");
}
Label {
id: allIsFineMsg
text: qsTr("The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.");
}
Button {
id: contactButton
text: qsTr("Contact with Developers");
}
ProgressBar {
id: progress
indeterminate: true;
}
Button {
id: diagnosticButton
text: qsTr("Diagnostic");
onClicked: {
if (root.model) {
root.model.diagnostic();
}
}
}
ListView {
id: list
anchors.fill: parent
model: root.model
visible: (root.model)? root.model.rowCount(): false
delegate: Component {
RowLayout {
function getSourceImage(status) {
switch(status) {
case 0: return ""; // detected
case 1: return ""; // solved
case 2: return ""; // failed
default: return "";// unknown status
}
}
Item {
Layout.fillWidth: true
}
Image {
id: bugStatuss
fillMode: Image.PreserveAspectFit
source: getSourceImage(issueStatus)
Layout.preferredHeight: 60
Layout.preferredWidth: height
}
Label {
text: issueName
}
Label {
text: issueDescription
}
Button {
text: qsTr("Repair");
}
Item {
Layout.fillWidth: true
}
width: list.width
}
}
}
}
state: "beginDiagnostic"
//beginDiagnostic
//searchBugs
//bugFound
//allIsFine
states: [
State {
name: "beginDiagnostic"
PropertyChanges {
target: atansionMsg;
visible: true
}
PropertyChanges {
target: descriptionMsg;
visible: true
}
PropertyChanges {
target: allIsFineMsg;
visible: false
}
PropertyChanges {
target: contactButton;
visible: false
}
PropertyChanges {
target: progress;
visible: false
}
PropertyChanges {
target: diagnosticButton;
visible: true
}
PropertyChanges {
target: list;
visible: false
}
},
State {
name: "searchBugs"
PropertyChanges {
target: atansionMsg;
visible: false
}
PropertyChanges {
target: descriptionMsg;
visible: false
}
PropertyChanges {
target: allIsFineMsg;
visible: false
}
PropertyChanges {
target: contactButton;
visible: false
}
PropertyChanges {
target: progress;
visible: true
}
PropertyChanges {
target: diagnosticButton;
visible: false
}
PropertyChanges {
target: list;
visible: false
}
},
State {
name: "bugFound"
PropertyChanges {
target: atansionMsg;
visible: false
}
PropertyChanges {
target: descriptionMsg;
visible: false
}
PropertyChanges {
target: allIsFineMsg;
visible: false
}
PropertyChanges {
target: contactButton;
visible: false
}
PropertyChanges {
target: progress;
visible: false
}
PropertyChanges {
target: diagnosticButton;
visible: false
}
PropertyChanges {
target: list;
visible: true
}
},
State {
name: "allIsFine"
PropertyChanges {
target: atansionMsg;
visible: false
}
PropertyChanges {
target: descriptionMsg;
visible: false
}
PropertyChanges {
target: allIsFineMsg;
visible: true
}
PropertyChanges {
target: contactButton;
visible: true
}
PropertyChanges {
target: progress;
visible: false
}
PropertyChanges {
target: diagnosticButton;
visible: false
}
PropertyChanges {
target: list;
visible: false
}
}
]
}

View File

@ -1,3 +1,3 @@
module QuasarAppCreditsModule
DoctorPill 1.0 DoctorPill.qml
DoctorView 1.0 DoctorView.qml

View File

@ -1,11 +1,11 @@
//#
//# Copyright (C) 2021-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2021-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#include "DoctorPill.h"
#include "doctorpill.h"
namespace DoctorPill {

19
src/Library/doctorpill.h Normal file
View File

@ -0,0 +1,19 @@
//#
//# Copyright (C) 2021-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
#include "DoctorPillCore/doctor.h"
#include "DoctorPillCore/ipill.h"
#include "DoctorPillCore/doctortest.h"
inline void initDoctorPillResources() { Q_INIT_RESOURCE(DoctorPill); }
namespace DoctorPill {
bool DOCTOR_PILL_EXPORT init();
};

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2018-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2018-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#
@ -10,10 +10,10 @@
#include <QtCore/qglobal.h>
#if defined(DoctorPill_LIBRARY)
# define DoctorPill_EXPORT Q_DECL_EXPORT
#if defined(DOCTOR_PILL_LIBRARY)
# define DOCTOR_PILL_EXPORT Q_DECL_EXPORT
#else
# define DoctorPill_EXPORT Q_DECL_IMPORT
# define DOCTOR_PILL_EXPORT Q_DECL_IMPORT
#endif
#endif //DoctorPill_GLOBAL_H

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,4 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>DP::PillsModel</name>
<message>
<source>Failed to fix bugs!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of incoplite bugs: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Bug fixed successfull!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>List of fixed bugs: %0</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DoctorView</name>
<message>
<source>Doctor page. The Doctor can help you to fix your app.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Attention: Please use this page only if you knows what you do. If your application works correctly then please - do nothing.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>This is your personal application doctor room! The doctor automatically check your application to exits errors. If the Doctor found any errors he suggest solution of your issue</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The Doctor not found any issues. If you sure that application is works wrong then you can contact with developers.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Contact with Developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Diagnostic</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Repair</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,6 +1,6 @@
#
# Copyright (C) 2020-2021 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Copyright (C) 2020-2022 QuasarApp.
# Distributed under the GPLv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2020-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2020-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2020-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2020-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2020-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2020-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2020-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2020-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2020-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2020-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2020-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2020-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#

View File

@ -1,6 +1,6 @@
//#
//# Copyright (C) 2020-2021 QuasarApp.
//# Distributed under the lgplv3 software license, see the accompanying
//# Copyright (C) 2020-2022 QuasarApp.
//# Distributed under the GPLv3 software license, see the accompanying
//# Everyone is permitted to copy and distribute verbatim copies
//# of this license document, but changing it is not allowed.
//#