summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-02-04 16:16:22 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-02-05 14:30:10 +0000
commitde17485da6879c0173145341410738df99cc7444 (patch)
treed786cc854d3a9280b48beaedf97a6c9edac5f4cc
parentcdb9cf6aebb943ec580b4cbead791c87bc66e5d9 (diff)
Fix namespace build on OS X
Change-Id: If4c8faa2e2400f0377f6c4728b0814fe059295ec Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
-rw-r--r--src/plugins/tts/osx/qtexttospeech_osx.h4
-rw-r--r--src/plugins/tts/osx/qtexttospeech_osx.mm14
2 files changed, 7 insertions, 11 deletions
diff --git a/src/plugins/tts/osx/qtexttospeech_osx.h b/src/plugins/tts/osx/qtexttospeech_osx.h
index 70de317..4739326 100644
--- a/src/plugins/tts/osx/qtexttospeech_osx.h
+++ b/src/plugins/tts/osx/qtexttospeech_osx.h
@@ -44,7 +44,7 @@
#include <QtTextToSpeech/qtexttospeechengine.h>
#include <QtTextToSpeech/qvoice.h>
-Q_FORWARD_DECLARE_OBJC_CLASS(StateDelegate);
+Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(StateDelegate));
Q_FORWARD_DECLARE_OBJC_CLASS(NSSpeechSynthesizer);
Q_FORWARD_DECLARE_OBJC_CLASS(NSString);
@@ -89,7 +89,7 @@ private:
QVoice voiceForNSVoice(NSString *voiceString) const;
NSSpeechSynthesizer *speechSynthesizer;
- StateDelegate *stateDelegate;
+ QT_MANGLE_NAMESPACE(StateDelegate) *stateDelegate;
QVector<QLocale> m_locales;
QMultiMap<QString, QVoice> m_voices;
};
diff --git a/src/plugins/tts/osx/qtexttospeech_osx.mm b/src/plugins/tts/osx/qtexttospeech_osx.mm
index 20b6ce2..9092144 100644
--- a/src/plugins/tts/osx/qtexttospeech_osx.mm
+++ b/src/plugins/tts/osx/qtexttospeech_osx.mm
@@ -38,18 +38,13 @@
#include "qtexttospeech_osx.h"
#include <qdebug.h>
-QT_BEGIN_NAMESPACE
-
-class QTextToSpeechEngineOsx;
-
-
-@interface StateDelegate : NSObject <NSSpeechSynthesizerDelegate>
+@interface QT_MANGLE_NAMESPACE(StateDelegate) : NSObject <NSSpeechSynthesizerDelegate>
{
- QTextToSpeechEngineOsx *speechPrivate;
+ QT_PREPEND_NAMESPACE(QTextToSpeechEngineOsx) *speechPrivate;
}
@end
-@implementation StateDelegate
+@implementation QT_MANGLE_NAMESPACE(StateDelegate)
- (id)initWithSpeechPrivate:(QTextToSpeechEngineOsx *) priv {
self = [super init];
speechPrivate = priv;
@@ -61,11 +56,12 @@ class QTextToSpeechEngineOsx;
}
@end
+QT_BEGIN_NAMESPACE
QTextToSpeechEngineOsx::QTextToSpeechEngineOsx(const QVariantMap &/*parameters*/, QObject *parent)
: QTextToSpeechEngine(parent), m_state(QTextToSpeech::Ready)
{
- stateDelegate = [[StateDelegate alloc] initWithSpeechPrivate:this];
+ stateDelegate = [[QT_MANGLE_NAMESPACE(StateDelegate) alloc] initWithSpeechPrivate:this];
speechSynthesizer = [[NSSpeechSynthesizer alloc] init];
[speechSynthesizer setDelegate: stateDelegate];