From 204360387f11f9bea84d6826b4f4d4c1a0cf4c69 Mon Sep 17 00:00:00 2001 From: Horosphere Date: Sun, 17 Jul 2016 09:20:13 -0700 Subject: [PATCH] Remove Qt keywords(signals, slots) to make compatible with QT_NO_KEYWORDS Exclude *.pyc, *.swp and build/ directory. The former makes editing easier for vim users, and the latter is for convenience --- .gitignore | 4 ++++ src/QtAV/AVClock.h | 4 ++-- src/QtAV/AVDemuxer.h | 2 +- src/QtAV/AVPlayer.h | 2 +- src/QtAV/Filter.h | 2 +- src/QtAV/OpenGLVideo.h | 2 +- src/QtAV/Subtitle.h | 4 ++-- src/QtAV/SubtitleFilter.h | 6 +++--- src/QtAV/VideoCapture.h | 2 +- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 1487d57aa..270a90990 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ Makefile* .obj /bin* /lib* +build Debug Release *.Debug @@ -65,3 +66,6 @@ Release *.moc *qrc_res.cpp +#cache +*.pyc +*.swp diff --git a/src/QtAV/AVClock.h b/src/QtAV/AVClock.h index 980e3b118..b3d386d90 100644 --- a/src/QtAV/AVClock.h +++ b/src/QtAV/AVClock.h @@ -110,13 +110,13 @@ class Q_AV_EXPORT AVClock : public QObject */ bool syncEndOnce(int id); -signals: +Q_SIGNALS: void paused(bool); void paused(); //equals to paused(true) void resumed();//equals to paused(false) void started(); void resetted(); -public slots: +public Q_SLOTS: //these slots are not frequently used. so not inline /*start the external clock*/ void start(); diff --git a/src/QtAV/AVDemuxer.h b/src/QtAV/AVDemuxer.h index cdc3441fc..3b720f5d2 100644 --- a/src/QtAV/AVDemuxer.h +++ b/src/QtAV/AVDemuxer.h @@ -187,7 +187,7 @@ class Q_AV_EXPORT AVDemuxer : public QObject */ void setOptions(const QVariantHash &dict); QVariantHash options() const; -signals: +Q_SIGNALS: void unloaded(); void userInterrupted(); //NO direct connection because it's emit before interrupted happens void loaded(); diff --git a/src/QtAV/AVPlayer.h b/src/QtAV/AVPlayer.h index ba035315c..c6e1b179b 100644 --- a/src/QtAV/AVPlayer.h +++ b/src/QtAV/AVPlayer.h @@ -391,7 +391,7 @@ class Q_AV_EXPORT AVPlayer : public QObject MediaEndAction mediaEndAction() const; void setMediaEndAction(MediaEndAction value); -public slots: +public Q_SLOTS: /*! * \brief load * Load the current media set by setFile(); Can be used to reload a media and call play() later. If already loaded, does nothing and return true. diff --git a/src/QtAV/Filter.h b/src/QtAV/Filter.h index cc5a94f06..9914533d7 100644 --- a/src/QtAV/Filter.h +++ b/src/QtAV/Filter.h @@ -62,7 +62,7 @@ class Q_AV_EXPORT Filter : public QObject bool uninstall(); public Q_SLOTS: void setEnabled(bool enabled = true); -signals: +Q_SIGNALS: void enabledChanged(bool); protected: /* diff --git a/src/QtAV/OpenGLVideo.h b/src/QtAV/OpenGLVideo.h index 986b39fca..b4e7f6013 100644 --- a/src/QtAV/OpenGLVideo.h +++ b/src/QtAV/OpenGLVideo.h @@ -102,7 +102,7 @@ class Q_AV_EXPORT OpenGLVideo : public QObject protected: DPTR_DECLARE(OpenGLVideo) -private slots: +private Q_SLOTS: /* used by Qt5 whose QOpenGLContext is QObject and we can call this when context is about to destroy. * shader manager and material will be reset */ diff --git a/src/QtAV/Subtitle.h b/src/QtAV/Subtitle.h index 2d1c230d0..68f044a7a 100644 --- a/src/QtAV/Subtitle.h +++ b/src/QtAV/Subtitle.h @@ -179,7 +179,7 @@ class Q_AV_EXPORT Subtitle : public QObject void setFontsDir(const QString& value); bool isFontFileForced() const; void setFontFileForced(bool value); -public slots: +public Q_SLOTS: /*! * \brief start * start to process the whole subtitle content in a thread @@ -187,7 +187,7 @@ public slots: void load(); void loadAsync(); void setTimestamp(qreal t); -signals: +Q_SIGNALS: // TODO: also add to AVPlayer? /// empty path if load from raw data void loaded(const QString& path = QString()); diff --git a/src/QtAV/SubtitleFilter.h b/src/QtAV/SubtitleFilter.h index bd3faa0c3..332bc7bde 100644 --- a/src/QtAV/SubtitleFilter.h +++ b/src/QtAV/SubtitleFilter.h @@ -83,15 +83,15 @@ class Q_AV_EXPORT SubtitleFilter : public VideoFilter, public SubtitleAPIProxy QFont font() const; void setColor(const QColor& c); QColor color() const; -public slots: +public Q_SLOTS: // TODO: enable changed & autoload=> load void setAutoLoad(bool value); -signals: +Q_SIGNALS: void rectChanged(); void fontChanged(); void colorChanged(); void autoLoadChanged(bool value); -signals: +Q_SIGNALS: void fileChanged(); void canRenderChanged(); void loaded(const QString& path); diff --git a/src/QtAV/VideoCapture.h b/src/QtAV/VideoCapture.h index 61a3cef37..bba49a4f9 100644 --- a/src/QtAV/VideoCapture.h +++ b/src/QtAV/VideoCapture.h @@ -116,7 +116,7 @@ public Q_SLOTS: void qualityChanged(); void captureNameChanged(); void captureDirChanged(); -private slots: +private Q_SLOTS: void handleAppQuit(); private: void setVideoFrame(const VideoFrame& frame);