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:
Roland Winklmeier
2014-01-18 20:12:02 +01:00
parent 08302c23bb
commit da6e7a58a4
3 changed files with 8 additions and 1 deletions

View File

@@ -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);

View File

@@ -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
{ {

View File

@@ -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