This commit is contained in:
ivaquero
2024-06-15 01:40:31 +08:00
parent 86d4bb7fb4
commit a0fafdf5b6
10 changed files with 30 additions and 18 deletions
+17
View File
@@ -0,0 +1,17 @@
CompileFlags:
Add: [-std=c++14, -Wno-documentation, -Wno-missing-prototypes]
Diagnostics:
ClangTidy:
Add:
[
performance-*,
bugprone-*,
modernize-*,
clang-analyzer-*,
readability-identifier*,
]
CheckOptions:
readability-identifier-naming.VariableCase: camelCase
Suppress: [-Wdeprecated-declarations]
+2 -5
View File
@@ -191,8 +191,5 @@ _deps
.cache .cache
.cmake .cmake
.vscode .qtc_clangd
.qt build
.qtc
.build
Vendored Executable
+3
View File
@@ -0,0 +1,3 @@
{
"cmake.configureOnOpen": false,
}
+1 -3
View File
@@ -29,9 +29,7 @@ class Clock(QWidget):
clock.start(1000) # update the clock per second clock.start(1000) # update the clock per second
self.show() self.show()
self.settings = QSettings( self.settings = QSettings(f"{sys.argv[0]}/../config.ini", QSettings.IniFormat)
f"{sys.argv[0]}/../config/config.ini", QSettings.IniFormat
)
font = QFont() font = QFont()
font.setFamily(self.settings.value("USER/FONT_FAMILY")) font.setFamily(self.settings.value("USER/FONT_FAMILY"))
font.setPointSize(int(self.settings.value("USER/FONT_SIZE"))) font.setPointSize(int(self.settings.value("USER/FONT_SIZE")))
+2 -2
View File
@@ -20,8 +20,8 @@ include_directories(
) )
set (SRCS set (SRCS
clock.cpp flock.cpp
clock.h flock.h
main.cpp main.cpp
) )
View File
+1 -1
View File
@@ -1,4 +1,4 @@
#include "clock.h" #include "flock.h"
Clock::Clock(QWidget *parent) : QWidget{parent}, pressed(false) { Clock::Clock(QWidget *parent) : QWidget{parent}, pressed(false) {
// geometry of Main Window (x, y, width, height) // geometry of Main Window (x, y, width, height)
View File
+2 -5
View File
@@ -6,13 +6,10 @@
QT = core gui widgets QT = core gui widgets
HEADERS = \ HEADERS = \
$$PWD/clock.h $$PWD/flock.h
SOURCES = \ SOURCES = \
$$PWD/build/CMakeFiles/3.27.1/CompilerIdC/CMakeCCompilerId.c \ $$PWD/flock.cpp \
$$PWD/build/CMakeFiles/3.27.1/CompilerIdCXX/CMakeCXXCompilerId.cpp \
$$PWD/clock_autogen/mocs_compilation.cpp \
$$PWD/clock.cpp \
$$PWD/main.cpp $$PWD/main.cpp
INCLUDEPATH = \ INCLUDEPATH = \
+2 -2
View File
@@ -1,8 +1,8 @@
#include <QApplication> #include <QApplication>
#include "clock.h" #include "flock.h"
int main(int argc, char *argv[]) { auto main(int argc, char *argv[]) -> int {
QApplication app(argc, argv); QApplication app(argc, argv);
Clock clock; Clock clock;