diff options
52 files changed, 193 insertions, 18 deletions
@@ -37,7 +37,9 @@ class Channel; class Player; class ChanACL : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(ChanACL); public: enum Perm { None = 0x0, diff --git a/src/Channel.h b/src/Channel.h index b881042ea..1faa9354d 100644 --- a/src/Channel.h +++ b/src/Channel.h @@ -38,7 +38,9 @@ class Group; class ChanACL; class Channel : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(Channel) private: QSet<Channel *> qsUnseen; public: diff --git a/src/Connection.h b/src/Connection.h index 95f7fb0e7..724fb276a 100644 --- a/src/Connection.h +++ b/src/Connection.h @@ -37,7 +37,9 @@ class Message; class Connection : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(Connection) private: static int iReceiveLevel; static QSet<Connection *> qsReceivers; diff --git a/src/CryptState.h b/src/CryptState.h index 6d91acae7..6ef37b5de 100644 --- a/src/CryptState.h +++ b/src/CryptState.h @@ -35,6 +35,8 @@ #include "Timer.h" class CryptState { + private: + Q_DISABLE_COPY(CryptState) public: unsigned char raw_key[AES_BLOCK_SIZE]; unsigned char encrypt_iv[AES_BLOCK_SIZE]; diff --git a/src/Group.h b/src/Group.h index 5641e83ea..c706f74f0 100644 --- a/src/Group.h +++ b/src/Group.h @@ -37,6 +37,8 @@ class Channel; class Player; class Group { + private: + Q_DISABLE_COPY(Group) public: Channel *c; QString qsName; diff --git a/src/PacketDataStream.h b/src/PacketDataStream.h index ecf7ba508..8d9ecebd2 100644 --- a/src/PacketDataStream.h +++ b/src/PacketDataStream.h @@ -37,6 +37,8 @@ class PacketDataStream { private: + Q_DISABLE_COPY(PacketDataStream) + private: unsigned char *data; quint32 maxsize; quint32 offset; diff --git a/src/Player.h b/src/Player.h index 115d8782e..b21bbf876 100644 --- a/src/Player.h +++ b/src/Player.h @@ -36,6 +36,8 @@ class Channel; class Player { + private: + Q_DISABLE_COPY(Player) public: enum State { Connected, Authenticated }; State sState; @@ -55,7 +57,9 @@ class Player { }; class ClientPlayer : public QObject, public Player { + private: Q_OBJECT + Q_DISABLE_COPY(ClientPlayer) public: ClientPlayer(QObject *p = NULL); static QHash<unsigned int, ClientPlayer *> c_qmPlayers; diff --git a/src/mumble/ACLEditor.h b/src/mumble/ACLEditor.h index ca4e44dce..ed5c0f281 100644 --- a/src/mumble/ACLEditor.h +++ b/src/mumble/ACLEditor.h @@ -37,7 +37,9 @@ #include "ui_ACLEditor.h" class ACLEditor : public QDialog, public Ui::ACLEditor { - Q_OBJECT; + private: + Q_OBJECT + Q_DISABLE_COPY(ACLEditor) protected: enum WaitID { GroupAdd, GroupRemove, GroupInherit, ACLList diff --git a/src/mumble/ALSAAudio.h b/src/mumble/ALSAAudio.h index 794a53e73..eb681f695 100644 --- a/src/mumble/ALSAAudio.h +++ b/src/mumble/ALSAAudio.h @@ -40,7 +40,9 @@ class ALSAAudioOutput; class ALSAAudioInput; class ALSAAudioInput : public AudioInput { + private: Q_OBJECT + Q_DISABLE_COPY(ALSAAudioInput) public: ALSAAudioInput(); ~ALSAAudioInput(); @@ -48,7 +50,9 @@ class ALSAAudioInput : public AudioInput { }; class ALSAAudioOutput : public AudioOutput { + private: Q_OBJECT + Q_DISABLE_COPY(ALSAAudioOutput) protected: public: ALSAAudioOutput(); diff --git a/src/mumble/ASIOInput.h b/src/mumble/ASIOInput.h index f838855ba..f6dbc7c35 100644 --- a/src/mumble/ASIOInput.h +++ b/src/mumble/ASIOInput.h @@ -40,7 +40,9 @@ typedef QPair<QString, QString> ASIODev; class ASIOConfig : public ConfigWidget, public Ui::ASIOConfig { + private: Q_OBJECT + Q_DISABLE_COPY(ASIOConfig) protected: QList<ASIODev> qlDevs; bool bOk; @@ -66,7 +68,9 @@ class ASIOConfig : public ConfigWidget, public Ui::ASIOConfig { #include "asio.h" class ASIOInput : public AudioInput { + private: Q_OBJECT + Q_DISABLE_COPY(ASIOInput) protected: IASIO *iasio; @@ -97,6 +101,4 @@ class ASIOInput : public AudioInput { void run(); }; -#else -class DXAudioInput; #endif diff --git a/src/mumble/About.h b/src/mumble/About.h index d99999e80..e2c7ba833 100644 --- a/src/mumble/About.h +++ b/src/mumble/About.h @@ -34,13 +34,17 @@ #include "mumble_pch.hpp" class AboutDialog : public QDialog { - Q_OBJECT; + private: + Q_OBJECT + Q_DISABLE_COPY(AboutDialog) public: AboutDialog(QWidget *parent); }; class AboutSpeexDialog : public QDialog { - Q_OBJECT; + private: + Q_OBJECT + Q_DISABLE_COPY(AboutSpeexDialog) public: AboutSpeexDialog(QWidget *parent); }; diff --git a/src/mumble/Audio.h b/src/mumble/Audio.h index a990f63af..d965e3d59 100644 --- a/src/mumble/Audio.h +++ b/src/mumble/Audio.h @@ -39,6 +39,8 @@ typedef QPair<QString,QVariant> audioDevice; class LoopPlayer : public ClientPlayer { + private: + Q_DISABLE_COPY(LoopPlayer) protected: typedef QPair<quint32, QByteArray> Packet; QMutex qmLock; diff --git a/src/mumble/AudioConfigDialog.h b/src/mumble/AudioConfigDialog.h index 537d8d072..f6c12f1c5 100644 --- a/src/mumble/AudioConfigDialog.h +++ b/src/mumble/AudioConfigDialog.h @@ -37,7 +37,9 @@ #include "ui_AudioOutput.h" class AudioInputDialog : public ConfigWidget, public Ui::AudioInput { + private: Q_OBJECT + Q_DISABLE_COPY(AudioInputDialog) public: AudioInputDialog(Settings &st); virtual QString title() const; @@ -58,7 +60,9 @@ class AudioInputDialog : public ConfigWidget, public Ui::AudioInput { }; class AudioOutputDialog : public ConfigWidget, public Ui::AudioOutput { + private: Q_OBJECT + Q_DISABLE_COPY(AudioOutputDialog) public: AudioOutputDialog(Settings &st); virtual QString title() const; diff --git a/src/mumble/AudioInput.h b/src/mumble/AudioInput.h index f108f7389..a63b0da94 100644 --- a/src/mumble/AudioInput.h +++ b/src/mumble/AudioInput.h @@ -39,6 +39,8 @@ class AudioInput; typedef boost::shared_ptr<AudioInput> AudioInputPtr; class AudioInputRegistrar { + private: + Q_DISABLE_COPY(AudioInputRegistrar) public: static QMap<QString, AudioInputRegistrar *> *qmNew; static QString current; @@ -60,7 +62,9 @@ class AudioInput : public QThread { friend class AudioEchoWidget; friend class AudioStats; friend class FMODSystem; + private: Q_OBJECT + Q_DISABLE_COPY(AudioInput) protected: typedef enum { SampleShort, SampleFloat } SampleFormat; typedef void (*inMixerFunc)(float * RESTRICT, const void * RESTRICT, unsigned int, unsigned int); diff --git a/src/mumble/AudioOutput.h b/src/mumble/AudioOutput.h index 5249c7199..f10834718 100644 --- a/src/mumble/AudioOutput.h +++ b/src/mumble/AudioOutput.h @@ -68,6 +68,8 @@ class ClientPlayer; typedef boost::shared_ptr<AudioOutput> AudioOutputPtr; class AudioOutputRegistrar { + private: + Q_DISABLE_COPY(AudioOutputRegistrar) public: static QMap<QString, AudioOutputRegistrar *> *qmNew; static QString current; @@ -85,7 +87,9 @@ class AudioOutputRegistrar { class AudioOutputPlayer : public QObject { friend class AudioOutput; + private: Q_OBJECT + Q_DISABLE_COPY(AudioOutputPlayer) protected: unsigned int iBufferSize; void resizeBuffer(unsigned int newsize); @@ -101,7 +105,9 @@ class AudioOutputPlayer : public QObject { class AudioOutputSpeech : public AudioOutputPlayer { friend class AudioOutput; + private: Q_OBJECT + Q_DISABLE_COPY(AudioOutputSpeech) protected: unsigned int iBufferOffset; unsigned int iBufferFilled; @@ -133,7 +139,9 @@ class AudioOutputSpeech : public AudioOutputPlayer { }; class AudioSine : public AudioOutputPlayer { + private: Q_OBJECT + Q_DISABLE_COPY(AudioSine) protected: float v; float inc; @@ -150,7 +158,9 @@ class AudioSine : public AudioOutputPlayer { }; class AudioOutput : public QThread { + private: Q_OBJECT + Q_DISABLE_COPY(AudioOutput) private: float *fSpeakers; float *fSpeakerVolume; diff --git a/src/mumble/AudioStats.h b/src/mumble/AudioStats.h index b36ab3e51..c336a3e43 100644 --- a/src/mumble/AudioStats.h +++ b/src/mumble/AudioStats.h @@ -34,7 +34,9 @@ #include "mumble_pch.hpp" class AudioBar : public QWidget { + private: Q_OBJECT + Q_DISABLE_COPY(AudioBar) protected: void paintEvent(QPaintEvent *event); public: @@ -46,7 +48,9 @@ class AudioBar : public QWidget { }; class AudioEchoWidget : public QGLWidget { + private: Q_OBJECT + Q_DISABLE_COPY(AudioEchoWidget) public: AudioEchoWidget(QWidget *parent); protected: @@ -56,7 +60,9 @@ class AudioEchoWidget : public QGLWidget { }; class AudioNoiseWidget : public QWidget { + private: Q_OBJECT + Q_DISABLE_COPY(AudioNoiseWidget) public: AudioNoiseWidget(QWidget *parent); protected slots: @@ -66,7 +72,9 @@ class AudioNoiseWidget : public QWidget { #include "ui_AudioStats.h" class AudioStats : public QDialog, public Ui::AudioStats { - Q_OBJECT; + private: + Q_OBJECT + Q_DISABLE_COPY(AudioStats) protected: QTimer *qtTick; bool bTalking; diff --git a/src/mumble/AudioWizard.h b/src/mumble/AudioWizard.h index 7c3e2cc56..ba3ae55b4 100644 --- a/src/mumble/AudioWizard.h +++ b/src/mumble/AudioWizard.h @@ -36,7 +36,9 @@ #include "AudioOutput.h"
class AudioWizard: public QWizard {
+ private:
Q_OBJECT
+ Q_DISABLE_COPY(AudioWizard)
protected:
QComboBox *qcbInput, *qcbInputDevice;
QComboBox *qcbOutput, *qcbOutputDevice;
diff --git a/src/mumble/BanEditor.h b/src/mumble/BanEditor.h index b0fedfa6e..5613c7d41 100644 --- a/src/mumble/BanEditor.h +++ b/src/mumble/BanEditor.h @@ -36,7 +36,9 @@ #include "Message.h" class BanEditor : public QDialog, public Ui::BanEditor { + private: Q_OBJECT; + Q_DISABLE_COPY(BanEditor) protected: QList<QPair<quint32, int> > qlBans; public: diff --git a/src/mumble/ConfigDialog.h b/src/mumble/ConfigDialog.h index 48c18e56a..c3ecfcfb3 100644 --- a/src/mumble/ConfigDialog.h +++ b/src/mumble/ConfigDialog.h @@ -36,7 +36,9 @@ #include "Settings.h" class ConfigWidget : public QWidget { + private: Q_OBJECT + Q_DISABLE_COPY(ConfigWidget) protected: void loadSlider(QSlider *, int); void loadCheckBox(QAbstractButton *, bool); @@ -59,6 +61,8 @@ typedef ConfigWidget *(*ConfigWidgetNew)(Settings &st); class ConfigRegistrar { friend class ConfigDialog; + private: + Q_DISABLE_COPY(ConfigRegistrar) protected: int iPriority; static QMap<int, ConfigWidgetNew> *c_qmNew; @@ -68,7 +72,9 @@ class ConfigRegistrar { }; class ConfigDialog : public QDialog, public Ui::ConfigDialog { - Q_OBJECT; + private: + Q_OBJECT + Q_DISABLE_COPY(ConfigDialog) protected: QHash<QListWidgetItem *, ConfigWidget *> qhWidgets; QHash<ConfigWidget *, QWidget *> qhPages; diff --git a/src/mumble/ConnectDialog.h b/src/mumble/ConnectDialog.h index ef1b8a598..d5b5ea350 100644 --- a/src/mumble/ConnectDialog.h +++ b/src/mumble/ConnectDialog.h @@ -49,7 +49,9 @@ class TextSortedItem : public QTreeWidgetItem { }; class ConnectDialog : public QDialog, public Ui::ConnectDialog { - Q_OBJECT; + private: + Q_OBJECT + Q_DISABLE_COPY(ConnectDialog) protected: static QList<PublicInfo> qlPublicServers; static Timer tPublicServers; diff --git a/src/mumble/DBus.h b/src/mumble/DBus.h index e8e644c3b..62a3e6856 100644 --- a/src/mumble/DBus.h +++ b/src/mumble/DBus.h @@ -34,8 +34,10 @@ #include "mumble_pch.hpp"
class MumbleDBus : public QDBusAbstractAdaptor {
+ private:
Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "net.sourceforge.mumble.Mumble");
+ Q_CLASSINFO("D-Bus Interface", "net.sourceforge.mumble.Mumble")
+ Q_DISABLE_COPY(MumbleDBus)
public:
MumbleDBus(QObject *parent);
public slots:
diff --git a/src/mumble/DXAudioInput.h b/src/mumble/DXAudioInput.h index 8bb2e91f5..02b6a16cf 100644 --- a/src/mumble/DXAudioInput.h +++ b/src/mumble/DXAudioInput.h @@ -35,7 +35,9 @@ #include <dsound.h> class DXAudioInput : public AudioInput { + private: Q_OBJECT + Q_DISABLE_COPY(DXAudioInput) protected: LPDIRECTSOUNDCAPTURE8 pDSCapture; LPDIRECTSOUNDCAPTUREBUFFER pDSCaptureBuffer; diff --git a/src/mumble/DXAudioOutput.h b/src/mumble/DXAudioOutput.h index fd57d7145..afedb36b1 100644 --- a/src/mumble/DXAudioOutput.h +++ b/src/mumble/DXAudioOutput.h @@ -38,7 +38,9 @@ #include <ksmedia.h> class DXAudioOutput : public AudioOutput { + private: Q_OBJECT + Q_DISABLE_COPY(DXAudioOutput) public: DXAudioOutput(); ~DXAudioOutput(); diff --git a/src/mumble/Database.h b/src/mumble/Database.h index 390f41934..74655d0ba 100644 --- a/src/mumble/Database.h +++ b/src/mumble/Database.h @@ -34,7 +34,9 @@ #include "mumble_pch.hpp" class Database : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(Database) public: Database(); static const QString getDigest(const QString &hostname, unsigned short port); diff --git a/src/mumble/Global.h b/src/mumble/Global.h index 196a64e83..a681cf05b 100644 --- a/src/mumble/Global.h +++ b/src/mumble/Global.h @@ -48,6 +48,9 @@ class QSettings; class Overlay; struct Global { +private: + Q_DISABLE_COPY(Global) +public: static Global *g_global_struct; MainWindow *mw; Settings s; @@ -81,6 +84,8 @@ struct Global { // after we reach main(). class DeferInit { + private: + Q_DISABLE_COPY(DeferInit) protected: static QMultiMap<int, DeferInit *> *qmDeferers; void add(int priority); diff --git a/src/mumble/GlobalShortcut.h b/src/mumble/GlobalShortcut.h index 2d41c453e..e0c9a5262 100644 --- a/src/mumble/GlobalShortcut.h +++ b/src/mumble/GlobalShortcut.h @@ -39,9 +39,11 @@ class GlobalShortcut : public QObject { friend class GlobalShortcutEngine; friend class GlobalShortcutConfig; + private: Q_OBJECT Q_PROPERTY(QVariant data READ data WRITE setData) Q_PROPERTY(bool active READ active) + Q_DISABLE_COPY(GlobalShortcut) protected: QString name; QVariant dv; @@ -68,12 +70,12 @@ class GlobalShortcut : public QObject { bool active() const { return bActive; }; - private: - Q_DISABLE_COPY(GlobalShortcut) }; class ShortcutKeyWidget : public QLineEdit { + private: Q_OBJECT + Q_DISABLE_COPY(ShortcutKeyWidget) protected: virtual void focusInEvent(QFocusEvent *event); virtual void focusOutEvent(QFocusEvent *event); @@ -90,7 +92,9 @@ class ShortcutKeyWidget : public QLineEdit { }; class GlobalShortcutConfig : public ConfigWidget { + private: Q_OBJECT + Q_DISABLE_COPY(GlobalShortcutConfig) protected: QHash<GlobalShortcut *, ShortcutKeyWidget *> qhKeys; QHash<GlobalShortcut *, QCheckBox *> qhSuppress; @@ -106,7 +110,9 @@ class GlobalShortcutConfig : public ConfigWidget { }; class GlobalShortcutEngine : public QThread { + private: Q_OBJECT + Q_DISABLE_COPY(GlobalShortcutEngine) public: bool bNeedRemap; Timer tReset; diff --git a/src/mumble/GlobalShortcut_macx.h b/src/mumble/GlobalShortcut_macx.h index 3070bb606..15e5f8442 100644 --- a/src/mumble/GlobalShortcut_macx.h +++ b/src/mumble/GlobalShortcut_macx.h @@ -38,7 +38,9 @@ #include "Global.h" class GlobalShortcutMacInit : public QObject, public DeferInit { + private: Q_OBJECT + Q_DISABLE_COPY(GlobalShortcutMacInit) public: void initialize(); public slots: @@ -49,8 +51,9 @@ class GlobalShortcutMacInit : public QObject, public DeferInit { }; class GlobalShortcutMac : public GlobalShortcutEngine { + private: Q_OBJECT - + Q_DISABLE_COPY(GlobalShortcutMac) public: GlobalShortcutMac(); ~GlobalShortcutMac(); diff --git a/src/mumble/GlobalShortcut_unix.h b/src/mumble/GlobalShortcut_unix.h index f3fbae419..c08e596a1 100644 --- a/src/mumble/GlobalShortcut_unix.h +++ b/src/mumble/GlobalShortcut_unix.h @@ -34,7 +34,9 @@ #define NUM_BUTTONS 0x2ff class GlobalShortcutX : public GlobalShortcutEngine { + private: Q_OBJECT + Q_DISABLE_COPY(GlobalShortcutX) public: Display *display; volatile bool bRunning; diff --git a/src/mumble/GlobalShortcut_win.h b/src/mumble/GlobalShortcut_win.h index 1de470c88..6a8ebb7c9 100644 --- a/src/mumble/GlobalShortcut_win.h +++ b/src/mumble/GlobalShortcut_win.h @@ -55,7 +55,9 @@ struct InputDevice { }; class GlobalShortcutWin : public GlobalShortcutEngine { + private: Q_OBJECT + Q_DISABLE_COPY(GlobalShortcutWin) public: QTimer *timer; diff --git a/src/mumble/Log.h b/src/mumble/Log.h index 818fbb20f..f07f2c04d 100644 --- a/src/mumble/Log.h +++ b/src/mumble/Log.h @@ -38,7 +38,9 @@ class TextToSpeech; class LogConfig : public ConfigWidget, public Ui::LogConfig { + private: Q_OBJECT + Q_DISABLE_COPY(LogConfig) public: LogConfig(Settings &st); virtual QString title() const; @@ -52,7 +54,9 @@ class LogConfig : public ConfigWidget, public Ui::LogConfig { class Log : public QObject { friend class LogConfig; + private: Q_OBJECT + Q_DISABLE_COPY(Log) public: enum MsgType { DebugInfo, CriticalError, Warning, Information, ServerConnected, ServerDisconnected, PlayerJoin, PlayerLeave, YouKicked, PlayerKicked, SelfMute, OtherSelfMute, YouMuted, YouMutedOther, OtherMutedOther, ChannelJoin, ChannelLeave, PermissionDenied, TextMessage }; static const MsgType firstMsgType = DebugInfo; diff --git a/src/mumble/LookConfig.h b/src/mumble/LookConfig.h index 9d263de21..428cfbd76 100644 --- a/src/mumble/LookConfig.h +++ b/src/mumble/LookConfig.h @@ -36,7 +36,9 @@ #include "ui_LookConfig.h"
class LookConfig : public ConfigWidget, Ui::LookConfig {
+ private:
Q_OBJECT
+ Q_DISABLE_COPY(LookConfig)
public:
LookConfig(Settings &st);
virtual QString title() const;
diff --git a/src/mumble/MainWindow.h b/src/mumble/MainWindow.h index 70a972340..e2ea784e7 100644 --- a/src/mumble/MainWindow.h +++ b/src/mumble/MainWindow.h @@ -53,7 +53,9 @@ class MessageBoxEvent : public QEvent { }; class LogTitleBar : public QWidget { + private: Q_OBJECT + Q_DISABLE_COPY(LogTitleBar) protected: QTimer *qtTick; int size; @@ -70,7 +72,9 @@ class LogTitleBar : public QWidget { class MainWindow : public QMainWindow, public MessageHandler, public Ui::MainWindow { friend class PlayerModel; + private: Q_OBJECT + Q_DISABLE_COPY(MainWindow) public: PlayerModel *pmModel; QSystemTrayIcon *qstiIcon; diff --git a/src/mumble/NetworkConfig.h b/src/mumble/NetworkConfig.h index cb843dc27..a39b45a80 100644 --- a/src/mumble/NetworkConfig.h +++ b/src/mumble/NetworkConfig.h @@ -36,7 +36,9 @@ #include "ui_NetworkConfig.h"
class NetworkConfig : public ConfigWidget, Ui::NetworkConfig {
+ private:
Q_OBJECT
+ Q_DISABLE_COPY(NetworkConfig)
public:
NetworkConfig(Settings &st);
virtual QString title() const;
diff --git a/src/mumble/OSS.h b/src/mumble/OSS.h index b8972b4c6..c158bb1ca 100644 --- a/src/mumble/OSS.h +++ b/src/mumble/OSS.h @@ -36,7 +36,9 @@ #include "ConfigDialog.h" class OSSInput : public AudioInput { + private: Q_OBJECT + Q_DISABLE_COPY(OSSInput) protected: void release(); public: @@ -47,7 +49,9 @@ class OSSInput : public AudioInput { class OSSOutput : public AudioOutput { friend class OSSPlayer; + private: Q_OBJECT + Q_DISABLE_COPY(OSSOutput) public: OSSOutput(); ~OSSOutput(); diff --git a/src/mumble/Overlay.h b/src/mumble/Overlay.h index c04f60307..17985b1c1 100644 --- a/src/mumble/Overlay.h +++ b/src/mumble/Overlay.h @@ -39,6 +39,8 @@ class Player; class SharedMemoryPrivate; class SharedMemory { + private: + Q_DISABLE_COPY(SharedMemory) protected: SharedMemoryPrivate *d; public: @@ -51,7 +53,9 @@ class SharedMemory { }; class OverlayConfig : public ConfigWidget, public Ui::OverlayConfig { + private: Q_OBJECT + Q_DISABLE_COPY(OverlayConfig) protected: QFont qfFont; QColor qcPlayer, qcAltTalking, qcTalking, qcChannel, qcChannelTalking; @@ -79,7 +83,9 @@ class OverlayConfig : public ConfigWidget, public Ui::OverlayConfig { class OverlayPrivate; class Overlay : public QObject { friend class OverlayConfig; + private: Q_OBJECT + Q_DISABLE_COPY(Overlay) protected: OverlayPrivate *d; diff --git a/src/mumble/PAAudio.h b/src/mumble/PAAudio.h index 3b1318a4c..2ab1fb2d3 100644 --- a/src/mumble/PAAudio.h +++ b/src/mumble/PAAudio.h @@ -48,7 +48,9 @@ typedef boost::weak_ptr<PortAudioSystem> WeakPortAudioSystemPtr; * several threads can open/close streams as they like. */ class PortAudioSystem : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(PortAudioSystem) protected: //! Mutex around PA stream creation/deletion static QMutex qmStream; @@ -64,7 +66,9 @@ class PortAudioSystem : public QObject { class PortAudioInput : public AudioInput { + private: Q_OBJECT + Q_DISABLE_COPY(PortAudioInput) public: PortAudioInput(); ~PortAudioInput(); @@ -73,7 +77,9 @@ class PortAudioInput : public AudioInput { class PortAudioOutput : public AudioOutput { + private: Q_OBJECT + Q_DISABLE_COPY(PortAudioOutput) public: PortAudioOutput(); ~PortAudioOutput(); diff --git a/src/mumble/PAAudioConfig.h b/src/mumble/PAAudioConfig.h index adf87cf11..f378dc264 100644 --- a/src/mumble/PAAudioConfig.h +++ b/src/mumble/PAAudioConfig.h @@ -36,7 +36,9 @@ #include "ui_PAAudioConfig.h" class PAAudioConfig : public ConfigWidget, public Ui::PAAudioConfig { + private: Q_OBJECT + Q_DISABLE_COPY(PAAudioConfig) public: PAAudioConfig(Settings &s); QString title() const; diff --git a/src/mumble/PlayerModel.h b/src/mumble/PlayerModel.h index 7bd04c9e3..c3d7a182e 100644 --- a/src/mumble/PlayerModel.h +++ b/src/mumble/PlayerModel.h @@ -38,7 +38,9 @@ class ClientPlayer; class Channel; class PlayerDelegate : public QItemDelegate { + private: Q_OBJECT + Q_DISABLE_COPY(PlayerDelegate) public: PlayerDelegate(QObject *parent = NULL); QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; @@ -48,6 +50,9 @@ class PlayerDelegate : public QItemDelegate { struct ModelItem { friend class PlayerModel; + private: + Q_DISABLE_COPY(ModelItem); + public: Channel *cChan; ClientPlayer *pPlayer; @@ -78,11 +83,11 @@ struct ModelItem { void wipe(); }; -class ChannelItem; - class PlayerModel : public QAbstractItemModel { friend struct ModelItem; + private: Q_OBJECT + Q_DISABLE_COPY(PlayerModel) protected: QIcon qiTalkingOn, qiTalkingAlt, qiTalkingOff; QIcon qiMutedSelf, qiMutedServer, qiMutedLocal; diff --git a/src/mumble/Plugins.h b/src/mumble/Plugins.h index 8a12cd5e7..05a549978 100644 --- a/src/mumble/Plugins.h +++ b/src/mumble/Plugins.h @@ -37,7 +37,9 @@ struct PluginInfo; class PluginConfig : public ConfigWidget, public Ui::PluginConfig { + private: Q_OBJECT + Q_DISABLE_COPY(PluginConfig) protected: void refillPluginList(); QHash<QListWidgetItem *, PluginInfo *> qhInfos; @@ -56,7 +58,9 @@ class PluginConfig : public ConfigWidget, public Ui::PluginConfig { class Plugins : public QObject { friend class PluginConfig; + private: Q_OBJECT + Q_DISABLE_COPY(Plugins) protected: QMutex qmPlugins; QList<PluginInfo *> qlPlugins; diff --git a/src/mumble/PositionalSound.h b/src/mumble/PositionalSound.h index a024c240d..13b5ea387 100644 --- a/src/mumble/PositionalSound.h +++ b/src/mumble/PositionalSound.h @@ -38,7 +38,9 @@ #include "ui_PositionalSound.h" class PlotWidget : public QWidget { + private: Q_OBJECT + Q_DISABLE_COPY(PlotWidget) protected: const QList<float> &xdata; const QList<float> &ydata; @@ -49,7 +51,9 @@ class PlotWidget : public QWidget { }; class PositionalSoundConfig : public ConfigWidget, public Ui::PositionalSoundConfig { + private: Q_OBJECT + Q_DISABLE_COPY(PositionalSoundConfig) protected: QList<float> xdata; QList<float> ydata; diff --git a/src/mumble/PulseAudio.h b/src/mumble/PulseAudio.h index 8401a21f7..8c011570c 100644 --- a/src/mumble/PulseAudio.h +++ b/src/mumble/PulseAudio.h @@ -40,7 +40,9 @@ class PulseAudioInput; class PulseAudioOutput; class PulseAudioSystem : public QThread { + private: Q_OBJECT + Q_DISABLE_COPY(PulseAudioSystem) public: pa_context *pacContext; pa_stream *pasInput, *pasOutput, *pasSpeaker; @@ -86,7 +88,9 @@ class PulseAudioSystem : public QThread { class PulseAudioInput : public AudioInput { friend class PulseAudioSystem; + private: Q_OBJECT + Q_DISABLE_COPY(PulseAudioInput) protected: pa_sample_spec pssMic, pssEcho; public: @@ -97,7 +101,9 @@ class PulseAudioInput : public AudioInput { class PulseAudioOutput : public AudioOutput { friend class PulseAudioSystem; + private: Q_OBJECT + Q_DISABLE_COPY(PulseAudioOutput) protected: pa_sample_spec pss; pa_channel_map pcm; diff --git a/src/mumble/ServerHandler.h b/src/mumble/ServerHandler.h index f0cafebde..8d5c590c6 100644 --- a/src/mumble/ServerHandler.h +++ b/src/mumble/ServerHandler.h @@ -49,7 +49,9 @@ class ServerHandlerMessageEvent : public QEvent { typedef boost::shared_ptr<Connection> ConnectionPtr; class ServerHandler : public QThread { + private: Q_OBJECT + Q_DISABLE_COPY(ServerHandler) protected: QString qsHostName; QString qsUserName; diff --git a/src/mumble/TextMessage.h b/src/mumble/TextMessage.h index 54625091a..089db29fe 100644 --- a/src/mumble/TextMessage.h +++ b/src/mumble/TextMessage.h @@ -35,7 +35,9 @@ #include "ui_TextMessage.h"
class TextMessage : public QDialog, public Ui::TextMessage {
- Q_OBJECT;
+ private:
+ Q_OBJECT
+ Q_DISABLE_COPY(TextMessage)
protected:
QString qsRep;
public:
diff --git a/src/mumble/TextToSpeech.h b/src/mumble/TextToSpeech.h index 9664a175a..0e5c62b04 100644 --- a/src/mumble/TextToSpeech.h +++ b/src/mumble/TextToSpeech.h @@ -37,7 +37,9 @@ class TextToSpeechPrivate; class TextToSpeech : public QObject { friend class TextToSpeechPrivate; + private: Q_OBJECT + Q_DISABLE_COPY(TextToSpeech) Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled) protected: bool enabled; diff --git a/src/mumble/VersionCheck.h b/src/mumble/VersionCheck.h index 53d96c6cd..7fd36f529 100644 --- a/src/mumble/VersionCheck.h +++ b/src/mumble/VersionCheck.h @@ -34,7 +34,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "mumble_pch.hpp" class VersionCheck : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(VersionCheck) protected: QUrl quUrl; QHttp *qhAgent; diff --git a/src/mumble/ViewCert.h b/src/mumble/ViewCert.h index 5c2a61941..2c0c1baec 100644 --- a/src/mumble/ViewCert.h +++ b/src/mumble/ViewCert.h @@ -34,7 +34,9 @@ #include "mumble_pch.hpp"
class ViewCert : public QDialog {
+ private:
Q_OBJECT
+ Q_DISABLE_COPY(ViewCert)
protected:
QList<QSslCertificate> qlCerts;
QListWidget *qlwChain, *qlwCert;
diff --git a/src/mumble/WASAPI.h b/src/mumble/WASAPI.h index 8c3c1a9bd..c7ac82191 100644 --- a/src/mumble/WASAPI.h +++ b/src/mumble/WASAPI.h @@ -46,7 +46,9 @@ #include <delayimp.h> class WASAPISystem : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(WASAPISystem) public: static const QHash<QString, QString> getDevices(EDataFlow dataflow); static const QHash<QString, QString> getInputDevices(); @@ -55,7 +57,9 @@ class WASAPISystem : public QObject { }; class WASAPIInput : public AudioInput { + private: Q_OBJECT + Q_DISABLE_COPY(WASAPIInput) public: WASAPIInput(); ~WASAPIInput(); @@ -63,7 +67,9 @@ class WASAPIInput : public AudioInput { }; class WASAPIOutput : public AudioOutput { + private: Q_OBJECT + Q_DISABLE_COPY(WASAPIOutput) public: WASAPIOutput(); ~WASAPIOutput(); diff --git a/src/murmur/DBus.h b/src/murmur/DBus.h index bac8eeeb8..bc4c67e19 100644 --- a/src/murmur/DBus.h +++ b/src/murmur/DBus.h @@ -123,8 +123,10 @@ Q_DECLARE_METATYPE(LogEntry); Q_DECLARE_METATYPE(QList<LogEntry>); class MurmurDBus : public QDBusAbstractAdaptor { + private: Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "net.sourceforge.mumble.Murmur"); + Q_CLASSINFO("D-Bus Interface", "net.sourceforge.mumble.Murmur") + Q_DISABLE_COPY(MurmurDBus) protected: Server *server; bool bReentrant; @@ -221,8 +223,10 @@ typedef QMap<QString, QString> ConfigMap; Q_DECLARE_METATYPE(ConfigMap); class MetaDBus : public QDBusAbstractAdaptor { + private: Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "net.sourceforge.mumble.Meta"); + Q_CLASSINFO("D-Bus Interface", "net.sourceforge.mumble.Meta") + Q_DISABLE_COPY(MetaDBus) protected: Meta *meta; public: diff --git a/src/murmur/Meta.h b/src/murmur/Meta.h index d4c23958b..5fc571962 100644 --- a/src/murmur/Meta.h +++ b/src/murmur/Meta.h @@ -84,7 +84,9 @@ struct MetaParams { }; class Meta : public QObject { + private: Q_OBJECT; + Q_DISABLE_COPY(Meta); public: static MetaParams mp; QHash<int, Server *> qhServers; diff --git a/src/murmur/Server.h b/src/murmur/Server.h index c18e9f6c7..5331315cf 100644 --- a/src/murmur/Server.h +++ b/src/murmur/Server.h @@ -64,7 +64,9 @@ struct BandwidthRecord { }; class LogEmitter : public QObject { + private: Q_OBJECT + Q_DISABLE_COPY(LogEmitter) signals: void newLogEntry(const QString &msg); public: @@ -73,7 +75,9 @@ class LogEmitter : public QObject { }; class SslServer : public QTcpServer { + private: Q_OBJECT; + Q_DISABLE_COPY(SslServer) protected: QList<QSslSocket *> qlSockets; void incomingConnection(int); @@ -85,7 +89,9 @@ class SslServer : public QTcpServer { class Server; class User : public Connection, public Player { + private: Q_OBJECT + Q_DISABLE_COPY(User) protected: Server *s; public: @@ -102,8 +108,9 @@ class ServerI; class Server : public QThread, public MessageHandler { friend class DBus; friend class Murmur::ServerI; + private: Q_OBJECT; - + Q_DISABLE_COPY(Server); protected: bool bRunning; diff --git a/src/murmur/Tray.h b/src/murmur/Tray.h index f9671edfa..3cfa2344c 100644 --- a/src/murmur/Tray.h +++ b/src/murmur/Tray.h @@ -35,7 +35,9 @@ #include "Server.h"
class Tray : public QObject {
+ private:
Q_OBJECT
+ Q_DISABLE_COPY(Tray);
protected:
QSystemTrayIcon *qsti;
QMenu *qm;
diff --git a/src/murmur/UnixMurmur.h b/src/murmur/UnixMurmur.h index 36d2a1a30..bfa34e891 100644 --- a/src/murmur/UnixMurmur.h +++ b/src/murmur/UnixMurmur.h @@ -35,6 +35,7 @@ class UnixMurmur : public QObject {
Q_OBJECT
+ Q_DISABLE_COPY(UnixMurmur)
protected:
static int iHupFd[2], iTermFd[2];
QSocketNotifier *qsnHup, *qsnTerm;
|