mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-02 15:15:39 +08:00
Add ifdefs arround native windows code to fix linux build
- There was some native windows code not properly covered by ifdefs. - handlePushToTalk() is not yet implemented on linux. Add a dummy.
This commit is contained in:
@@ -69,10 +69,12 @@ void MainWindow::audioIconContextMenu(const QPoint &position)
|
|||||||
if (!this->m_contextMenuAudio)
|
if (!this->m_contextMenuAudio)
|
||||||
{
|
{
|
||||||
this->m_contextMenuAudio = new QMenu(this);
|
this->m_contextMenuAudio = new QMenu(this);
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
if (QSysInfo::WindowsVersion && QSysInfo::WV_NT_based)
|
if (QSysInfo::WindowsVersion && QSysInfo::WV_NT_based)
|
||||||
{
|
{
|
||||||
this->m_contextMenuAudio->addAction("Mixer");
|
this->m_contextMenuAudio->addAction("Mixer");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *selectedItem = this->m_contextMenuAudio->exec(globalPosition);
|
QAction *selectedItem = this->m_contextMenuAudio->exec(globalPosition);
|
||||||
|
|||||||
@@ -13,7 +13,10 @@
|
|||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace BlackCore
|
namespace BlackCore
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
CVoiceVatlib *CVoiceVatlib::CKeyboard::s_voice = nullptr;
|
CVoiceVatlib *CVoiceVatlib::CKeyboard::s_voice = nullptr;
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#if defined(Q_OS_WIN)
|
||||||
|
|
||||||
HHOOK CVoiceVatlib::CKeyboard::s_keyboardHook = nullptr;
|
HHOOK CVoiceVatlib::CKeyboard::s_keyboardHook = nullptr;
|
||||||
|
|
||||||
@@ -72,6 +72,8 @@ namespace BlackCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
void CVoiceVatlib::handlePushToTalk() {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user