From b105d39e12c22321e06a6c4d9e8e05aaf92036bd Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Tue, 25 May 2010 16:33:44 +0100 Subject: Build fix for spectrum demo when -qtnamespace is used Task-number: QTBUG-10881 Reviewed-by: Liang Qi --- demos/spectrum/app/engine.h | 7 ++++--- demos/spectrum/app/mainwidget.h | 11 ++++++----- demos/spectrum/app/settingsdialog.h | 10 +++++----- demos/spectrum/app/spectrograph.h | 2 +- demos/spectrum/app/spectrumanalyser.h | 5 +++-- demos/spectrum/app/tonegenerator.h | 4 ++-- demos/spectrum/app/tonegeneratordialog.h | 8 ++++---- demos/spectrum/app/utils.h | 2 +- demos/spectrum/app/waveform.h | 2 +- 9 files changed, 27 insertions(+), 24 deletions(-) diff --git a/demos/spectrum/app/engine.h b/demos/spectrum/app/engine.h index 21867b3..ab5ae0d 100644 --- a/demos/spectrum/app/engine.h +++ b/demos/spectrum/app/engine.h @@ -64,10 +64,11 @@ #include #endif -class QAudioInput; -class QAudioOutput; class FrequencySpectrum; -class QFile; + +QT_FORWARD_DECLARE_CLASS(QAudioInput) +QT_FORWARD_DECLARE_CLASS(QAudioOutput) +QT_FORWARD_DECLARE_CLASS(QFile) /** * This class interfaces with the QtMultimedia audio classes, and also with diff --git a/demos/spectrum/app/mainwidget.h b/demos/spectrum/app/mainwidget.h index 86a47e6..ddab8b7 100644 --- a/demos/spectrum/app/mainwidget.h +++ b/demos/spectrum/app/mainwidget.h @@ -53,11 +53,12 @@ class Waveform; class LevelMeter; class SettingsDialog; class ToneGeneratorDialog; -class QAudioFormat; -class QLabel; -class QPushButton; -class QMenu; -class QAction; + +QT_FORWARD_DECLARE_CLASS(QAudioFormat) +QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QPushButton) +QT_FORWARD_DECLARE_CLASS(QMenu) +QT_FORWARD_DECLARE_CLASS(QAction) /** * Main application widget, responsible for connecting the various UI diff --git a/demos/spectrum/app/settingsdialog.h b/demos/spectrum/app/settingsdialog.h index 77b2b61..796b4af 100644 --- a/demos/spectrum/app/settingsdialog.h +++ b/demos/spectrum/app/settingsdialog.h @@ -45,11 +45,11 @@ #include #include -class QComboBox; -class QCheckBox; -class QSlider; -class QSpinBox; -class QGridLayout; +QT_FORWARD_DECLARE_CLASS(QComboBox) +QT_FORWARD_DECLARE_CLASS(QCheckBox) +QT_FORWARD_DECLARE_CLASS(QSlider) +QT_FORWARD_DECLARE_CLASS(QSpinBox) +QT_FORWARD_DECLARE_CLASS(QGridLayout) /** * Dialog used to control settings such as the audio input / output device diff --git a/demos/spectrum/app/spectrograph.h b/demos/spectrum/app/spectrograph.h index 45db244..ce59d90 100644 --- a/demos/spectrum/app/spectrograph.h +++ b/demos/spectrum/app/spectrograph.h @@ -44,7 +44,7 @@ #include #include "frequencyspectrum.h" -class QMouseEvent; +QT_FORWARD_DECLARE_CLASS(QMouseEvent) /** * Widget which displays a spectrograph showing the frequency spectrum diff --git a/demos/spectrum/app/spectrumanalyser.h b/demos/spectrum/app/spectrumanalyser.h index 98d9d84..ab4abe1 100644 --- a/demos/spectrum/app/spectrumanalyser.h +++ b/demos/spectrum/app/spectrumanalyser.h @@ -58,8 +58,9 @@ #include "FFTRealFixLenParam.h" #endif -class QAudioFormat; -class QThread; +QT_FORWARD_DECLARE_CLASS(QAudioFormat) +QT_FORWARD_DECLARE_CLASS(QThread) + class FFTRealWrapper; class SpectrumAnalyserThreadPrivate; diff --git a/demos/spectrum/app/tonegenerator.h b/demos/spectrum/app/tonegenerator.h index 0c2f8fd..bf31179 100644 --- a/demos/spectrum/app/tonegenerator.h +++ b/demos/spectrum/app/tonegenerator.h @@ -44,8 +44,8 @@ #include #include "spectrum.h" -class QAudioFormat; -class QByteArray; +QT_FORWARD_DECLARE_CLASS(QAudioFormat) +QT_FORWARD_DECLARE_CLASS(QByteArray) /** * Generate a sine wave diff --git a/demos/spectrum/app/tonegeneratordialog.h b/demos/spectrum/app/tonegeneratordialog.h index 2e66706..c2aa892 100644 --- a/demos/spectrum/app/tonegeneratordialog.h +++ b/demos/spectrum/app/tonegeneratordialog.h @@ -45,10 +45,10 @@ #include #include -class QCheckBox; -class QSlider; -class QSpinBox; -class QGridLayout; +QT_FORWARD_DECLARE_CLASS(QCheckBox) +QT_FORWARD_DECLARE_CLASS(QSlider) +QT_FORWARD_DECLARE_CLASS(QSpinBox) +QT_FORWARD_DECLARE_CLASS(QGridLayout) /** * Dialog which controls the parameters of the tone generator. diff --git a/demos/spectrum/app/utils.h b/demos/spectrum/app/utils.h index 596533e..4e29030 100644 --- a/demos/spectrum/app/utils.h +++ b/demos/spectrum/app/utils.h @@ -44,7 +44,7 @@ #include #include -class QAudioFormat; +QT_FORWARD_DECLARE_CLASS(QAudioFormat) //----------------------------------------------------------------------------- // Miscellaneous utility functions diff --git a/demos/spectrum/app/waveform.h b/demos/spectrum/app/waveform.h index dce3c37..57c9eec 100644 --- a/demos/spectrum/app/waveform.h +++ b/demos/spectrum/app/waveform.h @@ -46,7 +46,7 @@ #include #include -class QByteArray; +QT_FORWARD_DECLARE_CLASS(QByteArray) /** * Widget which displays a section of the audio waveform. -- cgit v0.12