适配QT_NO_EMIT宏

qt6
zcy 2022-05-03 21:26:26 +08:00
parent 99ef959c68
commit 4f2c6d444f
1 changed files with 12 additions and 0 deletions

12
Qss.cpp
View File

@ -153,7 +153,11 @@ void QssTtitleBar::onMaxOrRestore()
{ {
if (m_type != QTitleBar_Type_MainWindow) if (m_type != QTitleBar_Type_MainWindow)
return ; return ;
#ifdef QT_NO_EMIT
OnMaxOrRestore(m_maxOrRestore);
#else
emit(OnMaxOrRestore(m_maxOrRestore)); emit(OnMaxOrRestore(m_maxOrRestore));
#endif
setMaxOrRestore(!m_maxOrRestore); setMaxOrRestore(!m_maxOrRestore);
} }
@ -1811,7 +1815,11 @@ int QSSASyncProcess::Start(void *p)
connect(&mThread, &QThread::finished, this, &QObject::deleteLater); connect(&mThread, &QThread::finished, this, &QObject::deleteLater);
mThread.start(); mThread.start();
#ifdef QT_NO_EMIT
StartRun(p);
#else
emit StartRun(p); emit StartRun(p);
#endif
return 0; return 0;
} }
@ -1822,7 +1830,11 @@ QThread &QSSASyncProcess::Thread()
void QSSASyncProcess::Run(void *) void QSSASyncProcess::Run(void *)
{ {
#ifdef QT_NO_EMIT
Done();
#else
emit(Done()); emit(Done());
#endif
} }