Merge pull request #1 from mojitaurelie/dev
Fix nav bar, better .pro file
27
TaskNote.pro
@@ -4,25 +4,33 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++17
|
||||
|
||||
win32:VERSION = 1.1.1.0 # major.minor.patch.build
|
||||
else:VERSION = 1.1.1 # major.minor.patch
|
||||
|
||||
DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"
|
||||
DEFINES += APP_NAME=\"\\\"TaskNote\\\"\"
|
||||
|
||||
# remove possible other optimization flags
|
||||
win32 {
|
||||
message("Build for Windows")
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O1
|
||||
QMAKE_CXXFLAGS_RELEASE *= -O2
|
||||
DEFINES += APP_OS=\"\\\"Windows\\\"\"
|
||||
DEFINES += APP_OS_VERSION=\"\\\"$$system(wmic os get version /value)\\\"\"
|
||||
equals(QMAKE_TARGET.arch, arm64) {
|
||||
message("CPU Architecture : aarch64")
|
||||
# Add specific arm stuff here
|
||||
DEFINES += APP_ARCH=\"\\\"arm64\\\"\"
|
||||
}
|
||||
equals(QMAKE_TARGET.arch, x86_64) {
|
||||
message("CPU Architecture : x64")
|
||||
QMAKE_CXXFLAGS_RELEASE += -favor:INTEL64
|
||||
DEFINES += APP_ARCH=\"\\\"x64\\\"\"
|
||||
}
|
||||
RC_ICONS = icon.ico
|
||||
VERSION = 1.1.0.0
|
||||
QMAKE_TARGET_COMPANY = "Aurelie Delhaie"
|
||||
QMAKE_TARGET_PRODUCT = "TaskNote"
|
||||
QMAKE_TARGET_DESCRIPTION = "TaskNote"
|
||||
QMAKE_TARGET_DESCRIPTION = "Simple note-taking workbook"
|
||||
}
|
||||
|
||||
macx {
|
||||
@@ -33,18 +41,27 @@ macx {
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O1
|
||||
QMAKE_CXXFLAGS_RELEASE -= -O2
|
||||
QMAKE_CXXFLAGS_RELEASE *= -O3
|
||||
DEFINES += APP_OS=\"\\\"macOS\\\"\"
|
||||
DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
|
||||
equals(QMAKE_APPLE_DEVICE_ARCHS, arm64) {
|
||||
message("CPU Architecture : aarch64")
|
||||
DEFINES += APP_ARCH=\"\\\"aarch64\\\"\"
|
||||
QMAKE_CXXFLAGS_RELEASE += -mcpu=apple-a14
|
||||
}
|
||||
VERSION = 1.1.0
|
||||
}
|
||||
|
||||
linux-g++* {
|
||||
message("Build for Linux")
|
||||
|
||||
#LIBS += -L/usr/lib/crypto++ -lcrypto++
|
||||
#INCS += -I/usr/include/crypto++
|
||||
|
||||
#DEFINES += __SECURED=1
|
||||
DEFINES += APP_OS=\"\\\"$$system(cat /etc/issue | cut -d\' \' -f1)\\\"\"
|
||||
DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
|
||||
DEFINES += APP_ARCH=\"\\\"amd64\\\"\"
|
||||
QMAKE_CXXFLAGS_RELEASE *= -O3
|
||||
QMAKE_CXXFLAGS_RELEASE += -march=skylake
|
||||
VERSION = 1.1.0
|
||||
}
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 5.0.2, 2022-02-01T19:03:04. -->
|
||||
<!-- Written by QtCreator 6.0.2, 2022-03-01T21:27:21. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
<value type="QByteArray">{f1407b1e-b4d5-4aac-ba0d-b38072a0dfb8}</value>
|
||||
<value type="QByteArray">{dbe9fba1-e5a9-4d98-85bf-f46da0900eba}</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
<value type="int">0</value>
|
||||
<value type="qlonglong">0</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||
@@ -28,7 +28,7 @@
|
||||
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||
</valuemap>
|
||||
</valuemap>
|
||||
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||
@@ -77,7 +77,7 @@
|
||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">4</value>
|
||||
<value type="int" key="ClangTools.ParallelJobs">8</value>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||
@@ -89,30 +89,28 @@
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
<valuemap type="QVariantMap">
|
||||
<value type="QString" key="DeviceType">Desktop</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.2.0 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.2.0 for macOS</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.620.clang_64_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.2.3 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.2.3 GCC 64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.623.gcc_64_kit</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Debug</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis">
|
||||
<value type="QString">arm-darwin-generic-mach_o-64bit</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
@@ -123,7 +121,7 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
@@ -131,28 +129,27 @@
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Release</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Release</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis">
|
||||
<value type="QString">arm-darwin-generic-mach_o-64bit</value>
|
||||
</valuelist>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
@@ -163,7 +160,7 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
@@ -171,6 +168,7 @@
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
@@ -179,20 +177,20 @@
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||
<value type="int" key="EnableQmlDebugging">0</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Profile</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||
</valuemap>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
@@ -203,7 +201,7 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||
@@ -211,6 +209,7 @@
|
||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||
@@ -218,10 +217,10 @@
|
||||
<value type="int" key="QtQuickCompiler">0</value>
|
||||
<value type="int" key="SeparateDebugInfo">0</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
@@ -231,7 +230,7 @@
|
||||
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||
@@ -239,21 +238,19 @@
|
||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/alexis/TaskNote/TaskNote.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Users/alexis/TaskNote/TaskNote.pro</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release/TaskNote.app/Contents/MacOS</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||
<value type="int">1</value>
|
||||
<value type="qlonglong">1</value>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||
|
||||
11
icons.qrc
@@ -1,9 +1,12 @@
|
||||
<RCC>
|
||||
<qresource prefix="/icon">
|
||||
<file>resources/outline_add_circle_outline_black_18dp.png</file>
|
||||
<file>resources/outline_delete_forever_black_18dp.png</file>
|
||||
<file>resources/outline_save_black_18dp.png</file>
|
||||
<file>resources/outline_help_outline_black_18dp.png</file>
|
||||
<file>resources/outline_add_circle_outline_black_48dp.png</file>
|
||||
<file>resources/outline_delete_forever_black_48dp.png</file>
|
||||
<file>resources/outline_help_outline_black_48dp.png</file>
|
||||
<file>resources/outline_lock_black_48dp.png</file>
|
||||
<file>resources/outline_save_black_48dp.png</file>
|
||||
<file>resources/outline_shield_black_48dp.png</file>
|
||||
<file>resources/outline_lock_open_black_48dp.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/logo">
|
||||
<file>resources/logo.png</file>
|
||||
|
||||
|
Before Width: | Height: | Size: 208 B |
BIN
resources/outline_add_circle_outline_black_48dp.png
Normal file
|
After Width: | Height: | Size: 885 B |
|
Before Width: | Height: | Size: 183 B |
BIN
resources/outline_delete_forever_black_48dp.png
Normal file
|
After Width: | Height: | Size: 490 B |
|
Before Width: | Height: | Size: 271 B |
BIN
resources/outline_help_outline_black_48dp.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
resources/outline_lock_black_48dp.png
Normal file
|
After Width: | Height: | Size: 620 B |
BIN
resources/outline_lock_open_black_48dp.png
Normal file
|
After Width: | Height: | Size: 620 B |
|
Before Width: | Height: | Size: 191 B |
BIN
resources/outline_save_black_48dp.png
Normal file
|
After Width: | Height: | Size: 468 B |
BIN
resources/outline_shield_black_48dp.png
Normal file
|
After Width: | Height: | Size: 963 B |
@@ -6,7 +6,8 @@ AboutDialog::AboutDialog(QWidget *parent) :
|
||||
ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->appNameLabel->setText(QString("TaskNote (%1)").arg(QSysInfo::currentCpuArchitecture()));
|
||||
ui->appNameLabel->setText(QString("%1 (%2)").arg(APP_NAME, APP_ARCH));
|
||||
ui->versionLabel->setText(QString("Version %1").arg(APP_VERSION));
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="versionLabel">
|
||||
<property name="text">
|
||||
<string>Version 1.1.0.0</string>
|
||||
<string>Version 1.2.0.0</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
||||
@@ -14,6 +14,9 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(ui->noteList, &QListWidget::currentRowChanged, this, &MainWindow::selectionChanged);
|
||||
connect(ui->titleEdit, &QLineEdit::textChanged, this, &MainWindow::titleChanged);
|
||||
connect(ui->contentEdit, &QPlainTextEdit::textChanged, this, &MainWindow::contentChanged);
|
||||
#ifdef __SECURED
|
||||
connect(ui->actionEncrypt, &QAction::triggered, this, &MainWindow::encryptNote);
|
||||
#endif
|
||||
const QFont fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
ui->contentEdit->setFont(fixedFont);
|
||||
this->savemng = new SaveManager();
|
||||
@@ -55,8 +58,17 @@ void MainWindow::selectionChanged(int i)
|
||||
ui->titleEdit->setDisabled(false);
|
||||
ui->contentEdit->setDisabled(false);
|
||||
ui->titleEdit->setText(n->getTitle());
|
||||
#ifdef __SECURED
|
||||
if (n->isEncrypted())
|
||||
{
|
||||
ui->contentEdit->setPlainText(n->getEncryptedContent("azertyuiop"));
|
||||
} else {
|
||||
ui->contentEdit->setPlainText(n->getContent());
|
||||
ui->markdownViewer->setMarkdown(n->getContent());
|
||||
}
|
||||
#else
|
||||
ui->contentEdit->setPlainText(n->getContent());
|
||||
#endif
|
||||
ui->markdownViewer->setMarkdown(ui->contentEdit->toPlainText());
|
||||
}
|
||||
|
||||
void MainWindow::removeSelected()
|
||||
@@ -71,6 +83,7 @@ void MainWindow::removeSelected()
|
||||
|
||||
void MainWindow::save()
|
||||
{
|
||||
ui->actionSave->setDisabled(true);
|
||||
if (this->currentIndex > -1)
|
||||
{
|
||||
Note *n = this->savemng->getNoteByIndex(this->currentIndex);
|
||||
@@ -89,6 +102,7 @@ void MainWindow::titleChanged()
|
||||
n->setTitle(ui->titleEdit->text());
|
||||
ui->noteList->item(this->currentIndex)->setText(ui->titleEdit->text());
|
||||
}
|
||||
ui->actionSave->setDisabled(false);
|
||||
timer->start(1000);
|
||||
}
|
||||
|
||||
@@ -99,6 +113,18 @@ void MainWindow::showAboutBox()
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
#ifdef __SECURED
|
||||
void MainWindow::encryptNote()
|
||||
{
|
||||
if (this->currentIndex > -1)
|
||||
{
|
||||
Note *n = this->savemng->getNoteByIndex(this->currentIndex);
|
||||
n->encrypt("azertyuiop");
|
||||
savemng->flushSave();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::contentChanged()
|
||||
{
|
||||
timer->stop();
|
||||
@@ -108,6 +134,7 @@ void MainWindow::contentChanged()
|
||||
n->setContent(ui->contentEdit->toPlainText());
|
||||
ui->markdownViewer->setMarkdown(ui->contentEdit->toPlainText());
|
||||
}
|
||||
ui->actionSave->setDisabled(false);
|
||||
timer->start(1000);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ private slots:
|
||||
void contentChanged();
|
||||
void titleChanged();
|
||||
void showAboutBox();
|
||||
#ifdef __SECURED
|
||||
void encryptNote();
|
||||
#endif
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
||||
@@ -120,15 +120,24 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>33</height>
|
||||
<height>96</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
<property name="movable">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
@@ -140,12 +149,16 @@
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionSave"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionLock"/>
|
||||
<addaction name="actionUnlock"/>
|
||||
<addaction name="actionEncrypt"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<action name="actionAdd">
|
||||
<property name="icon">
|
||||
<iconset resource="../../icons.qrc">
|
||||
<normaloff>:/icon/resources/outline_add_circle_outline_black_18dp.png</normaloff>:/icon/resources/outline_add_circle_outline_black_18dp.png</iconset>
|
||||
<normaloff>:/icon/resources/outline_add_circle_outline_black_48dp.png</normaloff>:/icon/resources/outline_add_circle_outline_black_48dp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
@@ -157,16 +170,19 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../icons.qrc">
|
||||
<normaloff>:/icon/resources/outline_delete_forever_black_18dp.png</normaloff>:/icon/resources/outline_delete_forever_black_18dp.png</iconset>
|
||||
<normaloff>:/icon/resources/outline_delete_forever_black_48dp.png</normaloff>:/icon/resources/outline_delete_forever_black_48dp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../icons.qrc">
|
||||
<normaloff>:/icon/resources/outline_save_black_18dp.png</normaloff>:/icon/resources/outline_save_black_18dp.png</iconset>
|
||||
<normaloff>:/icon/resources/outline_save_black_48dp.png</normaloff>:/icon/resources/outline_save_black_48dp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
@@ -175,12 +191,48 @@
|
||||
<action name="actionAbout">
|
||||
<property name="icon">
|
||||
<iconset resource="../../icons.qrc">
|
||||
<normaloff>:/icon/resources/outline_help_outline_black_18dp.png</normaloff>:/icon/resources/outline_help_outline_black_18dp.png</iconset>
|
||||
<normaloff>:/icon/resources/outline_help_outline_black_48dp.png</normaloff>:/icon/resources/outline_help_outline_black_48dp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLock">
|
||||
<property name="icon">
|
||||
<iconset resource="../../icons.qrc">
|
||||
<normaloff>:/icon/resources/outline_lock_black_48dp.png</normaloff>:/icon/resources/outline_lock_black_48dp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lock</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionUnlock">
|
||||
<property name="icon">
|
||||
<iconset resource="../../icons.qrc">
|
||||
<normaloff>:/icon/resources/outline_lock_open_black_48dp.png</normaloff>:/icon/resources/outline_lock_open_black_48dp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Unlock</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEncrypt">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../icons.qrc">
|
||||
<normaloff>:/icon/resources/outline_shield_black_48dp.png</normaloff>:/icon/resources/outline_shield_black_48dp.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Encrypt</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../icons.qrc"/>
|
||||
|
||||
@@ -2,37 +2,87 @@
|
||||
|
||||
Note::Note()
|
||||
{
|
||||
|
||||
QUuid uid = QUuid::createUuid();
|
||||
this->uuid = uid.toString(QUuid::StringFormat::WithoutBraces);
|
||||
}
|
||||
|
||||
QJsonObject Note::toJson()
|
||||
{
|
||||
QJsonObject o;
|
||||
|
||||
o["uuid"] = this->uuid;
|
||||
o["title"] = this->title;
|
||||
o["content"] = this->content;
|
||||
|
||||
#ifdef __SECURED
|
||||
o["encrypted"] = this->encrypted;
|
||||
#endif
|
||||
return o;
|
||||
}
|
||||
|
||||
Note *Note::fromJson(QJsonObject o)
|
||||
{
|
||||
Note *n = new Note();
|
||||
n->uuid = o["uuid"].toString(n->uuid);
|
||||
n->title = o["title"].toString();
|
||||
n->content = o["content"].toString();
|
||||
n->encrypted = o["encrypted"].toBool(false);
|
||||
return n;
|
||||
}
|
||||
|
||||
QString Note::getUuid()
|
||||
{
|
||||
return uuid;
|
||||
}
|
||||
|
||||
QString Note::getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
QString Note::getContent()
|
||||
{
|
||||
if (!this->encrypted)
|
||||
{
|
||||
return content;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
#ifdef __SECURED
|
||||
QString Note::getEncryptedContent(QString passwd)
|
||||
{
|
||||
if (this->encrypted)
|
||||
{
|
||||
using namespace CryptoPP;
|
||||
std::string password = passwd.toStdString();
|
||||
QString bytes = QByteArray::fromBase64(QByteArray::fromStdString(this->content.toStdString()));
|
||||
std::string encoded = bytes.toStdString();
|
||||
std::string iv = encoded.substr(0, TAG_SIZE);
|
||||
std::string cipher = encoded.substr(TAG_SIZE + 1, encoded.length());
|
||||
std::string recovered;
|
||||
|
||||
try {
|
||||
GCM< AES >::Decryption d;
|
||||
d.SetKeyWithIV((const unsigned char*)password.c_str(), sizeof(password.c_str()), (const unsigned char*)iv.c_str(), sizeof(iv.c_str()));
|
||||
|
||||
AuthenticatedDecryptionFilter df( d,
|
||||
new StringSink(recovered),
|
||||
AuthenticatedDecryptionFilter::DEFAULT_FLAGS, TAG_SIZE
|
||||
);
|
||||
StringSource ss2(cipher, true,
|
||||
new Redirector(df)
|
||||
);
|
||||
return QString::fromStdString(recovered);
|
||||
} catch (CryptoPP::Exception& e) {
|
||||
std::cout << e.GetWhat() << "\n";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
bool Note::isEncrypted()
|
||||
{
|
||||
return this->encrypted;
|
||||
}
|
||||
#endif
|
||||
void Note::setTitle(QString value)
|
||||
{
|
||||
this->title = value;
|
||||
@@ -40,6 +90,57 @@ void Note::setTitle(QString value)
|
||||
|
||||
void Note::setContent(QString value)
|
||||
{
|
||||
if (!this->encrypted) {
|
||||
this->content = value;
|
||||
}
|
||||
}
|
||||
#ifdef __SECURED
|
||||
// TODO encrypt avec le mot de passe
|
||||
bool Note::setEncryptedContent(QString value, QString passwd)
|
||||
{
|
||||
if (this->encrypted) {
|
||||
using namespace CryptoPP;
|
||||
AutoSeededRandomPool prng;
|
||||
std::string password = passwd.toStdString();
|
||||
std::string pdata = value.toStdString();
|
||||
std::string cipher, encoded;
|
||||
|
||||
SecByteBlock key(AES::MAX_KEYLENGTH + AES::BLOCKSIZE);
|
||||
SecByteBlock iv(AES::BLOCKSIZE);
|
||||
prng.GenerateBlock(iv, iv.size());
|
||||
try
|
||||
{
|
||||
GCM<AES>::Encryption e;
|
||||
e.SetKeyWithIV(key, sizeof(key), iv, sizeof(iv));
|
||||
|
||||
StringSource ss1(pdata, true,
|
||||
new AuthenticatedEncryptionFilter(e,
|
||||
new StringSink(cipher), false, TAG_SIZE
|
||||
)
|
||||
);
|
||||
std::string s(reinterpret_cast< char const* >(iv.data())) ;
|
||||
encoded = s + cipher;
|
||||
auto bytes = QByteArray::fromStdString(encoded);
|
||||
this->content = bytes.toBase64();
|
||||
return true;
|
||||
}
|
||||
catch(CryptoPP::Exception& e)
|
||||
{
|
||||
std::cout << e.GetWhat() << "\n";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Note::encrypt(QString password)
|
||||
{
|
||||
if (!this->encrypted && (password.length() >= 6)) {
|
||||
this->encrypted = true;
|
||||
if (!setEncryptedContent(this->content, password))
|
||||
{
|
||||
this->encrypted = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1,8 +1,27 @@
|
||||
#ifndef NOTE_H
|
||||
#define NOTE_H
|
||||
|
||||
#define TAG_SIZE 12
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <QString>
|
||||
#include <QJsonObject>
|
||||
#include <QUuid>
|
||||
#include <QMessageBox>
|
||||
|
||||
#ifdef __SECURED
|
||||
#include <crypto++/modes.h>
|
||||
#include <crypto++/aes.h>
|
||||
#include <crypto++/filters.h>
|
||||
#include <crypto++/cryptlib.h>
|
||||
#include <crypto++/sha.h>
|
||||
#include <crypto++/hkdf.h>
|
||||
#include <crypto++/osrng.h>
|
||||
#include <crypto++/gcm.h>
|
||||
#include <crypto++/rijndael.h>
|
||||
#endif
|
||||
|
||||
class Note
|
||||
{
|
||||
@@ -12,15 +31,27 @@ public:
|
||||
QJsonObject toJson();
|
||||
static Note* fromJson(QJsonObject o);
|
||||
|
||||
QString getUuid();
|
||||
QString getTitle();
|
||||
QString getContent();
|
||||
|
||||
#ifdef __SECURED
|
||||
QString getEncryptedContent(QString passwd);
|
||||
bool isEncrypted();
|
||||
#endif
|
||||
|
||||
void setTitle(QString value);
|
||||
void setContent(QString value);
|
||||
|
||||
#ifdef __SECURED
|
||||
bool setEncryptedContent(QString value, QString passwd);
|
||||
void encrypt(QString password);
|
||||
#endif
|
||||
private:
|
||||
QString uuid;
|
||||
QString title;
|
||||
QString content;
|
||||
bool encrypted;
|
||||
};
|
||||
|
||||
#endif // NOTE_H
|
||||
|
||||
@@ -8,6 +8,10 @@ SaveManager::SaveManager()
|
||||
SaveManager::~SaveManager()
|
||||
{
|
||||
flushSave();
|
||||
foreach (Note *n, notes)
|
||||
{
|
||||
delete n;
|
||||
}
|
||||
}
|
||||
|
||||
void SaveManager::flushSave()
|
||||
|
||||