fix: fix slot connect fail log when running app
- fix slot connect fail log when running app - fix potential memory leak
This commit is contained in:
@@ -143,6 +143,13 @@ else()
|
|||||||
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${PPIC_TS_FILES} QM_FILES_OUTPUT_VARIABLE PPIC_QM_FILES)
|
qt_add_translations(${EXE_NAME} ${ADD_TRANSLATIONS_ADDITIONAL_ARGS} TS_FILES ${PPIC_TS_FILES} QM_FILES_OUTPUT_VARIABLE PPIC_QM_FILES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# YYC MARK:
|
||||||
|
# We use this to disable that Qt UIC generate code like `QMetaObject::connectSlotsByName(foobar);`
|
||||||
|
# for the header file of `.ui` file, which cause this application outputs log at runtime like
|
||||||
|
# `qt.core.qmetaobject.connectslotsbyname: QMetaObject::connectSlotsByName: No matching signal for on_actionXxx_triggered()`,
|
||||||
|
# because we only use UIC for building user interface and all signals and actions are managed by ourselves.
|
||||||
|
set_target_properties(${EXE_NAME} PROPERTIES AUTOUIC_OPTIONS "-a")
|
||||||
|
|
||||||
# YYC MARK:
|
# YYC MARK:
|
||||||
# This is essential, otherwise Qt UIC generated UI header file
|
# This is essential, otherwise Qt UIC generated UI header file
|
||||||
# can not find our header files if there are custom widgets inside UI file.
|
# can not find our header files if there are custom widgets inside UI file.
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ public:
|
|||||||
void setupAction(MainWindow * mainWindow);
|
void setupAction(MainWindow * mainWindow);
|
||||||
void setupShortcuts();
|
void setupShortcuts();
|
||||||
|
|
||||||
public slots:
|
|
||||||
void updateActionState(PlaylistManager* pm, GraphicsView* gv);
|
void updateActionState(PlaylistManager* pm, GraphicsView* gv);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
|
delete m_am;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user