clean: delete unused QSemaphore and do a header cleanup
Some checks are pending
SonarCloud / Build and analyze (push) Waiting to run

This commit is contained in:
shenleban tongying 2024-11-21 08:06:17 -05:00 committed by GitHub
parent d3700f2926
commit 0680edd1e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 40 additions and 129 deletions

View file

@ -1,7 +1,6 @@
#include "audiooutput.hh" #include "audiooutput.hh"
#include <QAudioFormat> #include <QtConcurrentRun>
#include <QtConcurrent/qtconcurrentrun.h>
#include <QFuture> #include <QFuture>
#include <QWaitCondition> #include <QWaitCondition>
#include <QCoreApplication> #include <QCoreApplication>

View file

@ -16,16 +16,11 @@
#include <set> #include <set>
#include <string> #include <string>
#include <QDir>
#include <QString> #include <QString>
#include <QSemaphore>
#include <QThreadPool>
#include <QAtomicInt> #include <QAtomicInt>
#include <QDomDocument>
#include <QtEndian> #include <QtEndian>
#include <QRegularExpression> #include <QRegularExpression>
#include "ufile.hh"
#include "wstring_qt.hh"
#include "utils.hh" #include "utils.hh"
namespace Aard { namespace Aard {

View file

@ -14,20 +14,17 @@
#include "language.hh" #include "language.hh"
#include "utf8.hh" #include "utf8.hh"
#include "utils.hh" #include "utils.hh"
#include <ctype.h> #include <ctype.h>
#include <list> #include <list>
#include <map> #include <map>
#include <set> #include <set>
#include <string.h> #include <string.h>
#include <zlib.h> #include <zlib.h>
#include <QAtomicInt> #include <QAtomicInt>
#include <QCryptographicHash>
#include <QDir>
#include <QPainter> #include <QPainter>
#include <QRegularExpression> #include <QRegularExpression>
#include <QSemaphore>
#include <QThreadPool>
namespace Bgl { namespace Bgl {

View file

@ -4,9 +4,6 @@
#include "btreeidx.hh" #include "btreeidx.hh"
#include "folding.hh" #include "folding.hh"
#include "utf8.hh" #include "utf8.hh"
#include <QRunnable>
#include <QThreadPool>
#include <QSemaphore>
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -18,7 +15,7 @@
#include "wildcard.hh" #include "wildcard.hh"
#include "globalbroadcaster.hh" #include "globalbroadcaster.hh"
#include <QtConcurrent> #include <QtConcurrentRun>
#include <zlib.h> #include <zlib.h>
namespace BtreeIndexing { namespace BtreeIndexing {

View file

@ -5,17 +5,12 @@
#include "dict/dictionary.hh" #include "dict/dictionary.hh"
#include "dictfile.hh" #include "dictfile.hh"
#include <algorithm>
#include <map> #include <map>
#include <stdint.h> #include <stdint.h>
#include <string> #include <string>
#include <vector> #include <vector>
#include <QFuture> #include <QFuture>
#include <QList> #include <QList>
#include <QSet>
#include <QList>
/// A base for the dictionary which creates a btree index to look up /// A base for the dictionary which creates a btree index to look up

View file

@ -7,7 +7,6 @@
#include "utf8.hh" #include "utf8.hh"
#include "dictzip.hh" #include "dictzip.hh"
#include "htmlescape.hh" #include "htmlescape.hh"
#include "langcoder.hh" #include "langcoder.hh"
#include <map> #include <map>
#include <set> #include <set>
@ -18,6 +17,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "gddebug.hh" #include "gddebug.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include <QDir>
#include <QUrl> #include <QUrl>

View file

@ -7,11 +7,12 @@
#include <QUrl> #include <QUrl>
#include <QTcpSocket> #include <QTcpSocket>
#include <QString> #include <QString>
#include <list>
#include "htmlescape.hh" #include "htmlescape.hh"
#include <QCryptographicHash>
#include <QDir>
#include <QFileInfo>
#include <QRegularExpression> #include <QRegularExpression>
#include <QtConcurrent> #include <QtConcurrentRun>
namespace DictServer { namespace DictServer {

View file

@ -11,7 +11,6 @@
#include "htmlescape.hh" #include "htmlescape.hh"
#include "iconv.hh" #include "iconv.hh"
#include "filetype.hh" #include "filetype.hh"
#include "audiolink.hh" #include "audiolink.hh"
#include "langcoder.hh" #include "langcoder.hh"
#include "wstring_qt.hh" #include "wstring_qt.hh"
@ -19,36 +18,22 @@
#include "gddebug.hh" #include "gddebug.hh"
#include "tiff.hh" #include "tiff.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include <map> #include <map>
#include <set> #include <set>
#include <string> #include <string>
#include <vector> #include <vector>
#include <list> #include <list>
#include <wctype.h> #include <wctype.h>
#include <QSemaphore>
#include <QThreadPool> #include <QThreadPool>
#include <QAtomicInt> #include <QAtomicInt>
#include <QUrl> #include <QUrl>
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
#include <QPainter> #include <QPainter>
#include <QStringList>
#include <QRegularExpression> #include <QRegularExpression>
// For TIFF conversion
#include <QImage>
#include <QByteArray> #include <QByteArray>
#include <QBuffer> #include <QSvgRenderer>
#include <QtConcurrentRun>
// For SVG handling
#include <QtSvg/QSvgRenderer>
#include <QtConcurrent>
#include "utils.hh" #include "utils.hh"
namespace Dsl { namespace Dsl {
@ -154,7 +139,6 @@ class DslDictionary: public BtreeIndexing::BtreeDictionary
QAtomicInt deferredInitDone; QAtomicInt deferredInitDone;
QMutex deferredInitMutex; QMutex deferredInitMutex;
bool deferredInitRunnableStarted; bool deferredInitRunnableStarted;
QSemaphore deferredInitRunnableExited;
string initError; string initError;
@ -1405,7 +1389,6 @@ class DslArticleRequest: public Dictionary::DataRequest
bool ignoreDiacritics; bool ignoreDiacritics;
QAtomicInt isCancelled; QAtomicInt isCancelled;
QSemaphore hasExited;
QFuture< void > f; QFuture< void > f;
public: public:
@ -1582,7 +1565,6 @@ class DslResourceRequest: public Dictionary::DataRequest
string resourceName; string resourceName;
QAtomicInt isCancelled; QAtomicInt isCancelled;
QSemaphore hasExited;
QFuture< void > f; QFuture< void > f;
public: public:

View file

@ -1,26 +1,19 @@
/* This file is (c) 2014 Abs62 /* This file is (c) 2014 Abs62
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#include <QDir>
#ifndef NO_EPWING_SUPPORT #ifndef NO_EPWING_SUPPORT
#include "epwing_book.hh" #include "epwing_book.hh"
#include "epwing.hh" #include "epwing.hh"
#include <QByteArray> #include <QByteArray>
#include <QDir>
#include <QRunnable>
#include <QSemaphore>
#include <map> #include <map>
#include <QtConcurrent> #include <QtConcurrentRun>
#include <set> #include <set>
#include <string> #include <string>
#include "btreeidx.hh" #include "btreeidx.hh"
#include "folding.hh" #include "folding.hh"
#include "gddebug.hh" #include "gddebug.hh"
#include "chunkedstorage.hh" #include "chunkedstorage.hh"
#include "wstring_qt.hh"
#include "filetype.hh" #include "filetype.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include "globalregex.hh" #include "globalregex.hh"

View file

@ -16,24 +16,16 @@
#include "dictzip.hh" #include "dictzip.hh"
#include "indexedzip.hh" #include "indexedzip.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include "htmlescape.hh" #include "htmlescape.hh"
#include "filetype.hh" #include "filetype.hh"
#include "tiff.hh" #include "tiff.hh"
#include "audiolink.hh" #include "audiolink.hh"
#include <QString> #include <QString>
#include <QSemaphore>
#include <QThreadPool>
#include <QAtomicInt> #include <QAtomicInt>
// For TIFF conversion
#include <QImage>
#include <QByteArray> #include <QByteArray>
#include <QBuffer> #include <QDir>
#include <QRegularExpression> #include <QRegularExpression>
#include <QtCore5Compat/QTextCodec> #include <QtCore5Compat/QTextCodec>
#include <string> #include <string>
#include <list> #include <list>
#include <map> #include <map>

View file

@ -6,30 +6,22 @@
#include "htmlescape.hh" #include "htmlescape.hh"
#include "iconv.hh" #include "iconv.hh"
#include "folding.hh" #include "folding.hh"
#include "wstring_qt.hh"
#include "language.hh" #include "language.hh"
#include "langcoder.hh" #include "langcoder.hh"
#include <QRunnable>
#include <QThreadPool>
#include <QSemaphore>
#include <QRegularExpression> #include <QRegularExpression>
#include <QDir> #include <QDir>
#include <QCoreApplication> #include <QCoreApplication>
#include <QFileInfo> #include <QFileInfo>
#include <set> #include <set>
#include "gddebug.hh"
#include "utils.hh"
#include <QtConcurrentRun>
#ifndef INCLUDE_LIBRARY_PATH #ifndef INCLUDE_LIBRARY_PATH
#include <hunspell.hxx> #include <hunspell.hxx>
#else #else
#include <hunspell/hunspell.hxx> #include <hunspell/hunspell.hxx>
#endif #endif
#include "gddebug.hh"
#include "utils.hh"
#include <QtConcurrent>
namespace HunspellMorpho { namespace HunspellMorpho {

View file

@ -11,19 +11,16 @@
#include "chunkedstorage.hh" #include "chunkedstorage.hh"
#include "gddebug.hh" #include "gddebug.hh"
#include "langcoder.hh" #include "langcoder.hh"
#include "audiolink.hh" #include "audiolink.hh"
#include "ex.hh" #include "ex.hh"
#include "mdictparser.hh" #include "mdictparser.hh"
#include "filetype.hh" #include "filetype.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include "htmlescape.hh" #include "htmlescape.hh"
#include <algorithm> #include <algorithm>
#include <map> #include <map>
#include <set> #include <set>
#include <list> #include <list>
#include "globalregex.hh" #include "globalregex.hh"
#include "tiff.hh" #include "tiff.hh"
#include "utils.hh" #include "utils.hh"
@ -32,8 +29,9 @@
#include <QDir> #include <QDir>
#include <QRegularExpression> #include <QRegularExpression>
#include <QString> #include <QString>
#include <QStringBuilder>
#include <QThreadPool> #include <QThreadPool>
#include <QtConcurrent> #include <QtConcurrentRun>
namespace Mdx { namespace Mdx {

View file

@ -13,8 +13,8 @@
#include "utf8.hh" #include "utf8.hh"
#include <map> #include <map>
#include <QAtomicInt> #include <QAtomicInt>
#include <QDir>
#include <QRegularExpression> #include <QRegularExpression>
#include <QSemaphore>
#include <QString> #include <QString>
#include <set> #include <set>
#include <string> #include <string>

View file

@ -10,25 +10,22 @@
#include "utf8.hh" #include "utf8.hh"
#include "decompress.hh" #include "decompress.hh"
#include "langcoder.hh" #include "langcoder.hh"
#include "wstring_qt.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include "htmlescape.hh" #include "htmlescape.hh"
#include "filetype.hh" #include "filetype.hh"
#include "tiff.hh" #include "tiff.hh"
#include "utils.hh" #include "utils.hh"
#include "iconv.hh" #include "iconv.hh"
#include <QString> #include <QString>
#include <QStringBuilder>
#include <QFile> #include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QDir> #include <QDir>
#include <QMap> #include <QMap>
#include <QProcess> #include <QProcess>
#include <QList> #include <QList>
#include <QtEndian>
#include <QRegularExpression> #include <QRegularExpression>
#include <string> #include <string>
#include <vector> #include <vector>
#include <utility> #include <utility>

View file

@ -11,36 +11,30 @@
#include "htmlescape.hh" #include "htmlescape.hh"
#include "langcoder.hh" #include "langcoder.hh"
#include "gddebug.hh" #include "gddebug.hh"
#include "filetype.hh" #include "filetype.hh"
#include "indexedzip.hh" #include "indexedzip.hh"
#include "tiff.hh" #include "tiff.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include "audiolink.hh" #include "audiolink.hh"
#include <zlib.h> #include <zlib.h>
#include <map> #include <map>
#include <set> #include <set>
#include <string> #include <string>
#include <QString>
#include <QAtomicInt>
#include <QDomDocument>
#include "ufile.hh"
#include "utils.hh"
#include <QRegularExpression>
#include "globalregex.hh"
#include <QDir>
#include <stdlib.h>
#ifndef Q_OS_WIN #ifndef Q_OS_WIN
#include <arpa/inet.h> #include <arpa/inet.h>
#else #else
#include <winsock.h> #include <winsock.h>
#endif #endif
#include <stdlib.h>
#include <QString>
#include <QSemaphore>
#include <QAtomicInt>
#include <QStringList>
#include <QDomDocument>
#include "ufile.hh"
#include "utils.hh"
#include <QRegularExpression>
#include "globalregex.hh"
namespace Stardict { namespace Stardict {

View file

@ -8,7 +8,6 @@
#include "chunkedstorage.hh" #include "chunkedstorage.hh"
#include "dictzip.hh" #include "dictzip.hh"
#include "htmlescape.hh" #include "htmlescape.hh"
#include <map> #include <map>
#include <set> #include <set>
#include <string> #include <string>
@ -17,26 +16,19 @@
#include <wctype.h> #include <wctype.h>
#include <stdlib.h> #include <stdlib.h>
#include "gddebug.hh" #include "gddebug.hh"
#include "wstring_qt.hh"
#include "xdxf2html.hh" #include "xdxf2html.hh"
#include "ufile.hh" #include "ufile.hh"
#include "dictzip.hh"
#include "langcoder.hh" #include "langcoder.hh"
#include "indexedzip.hh" #include "indexedzip.hh"
#include "filetype.hh" #include "filetype.hh"
#include "tiff.hh" #include "tiff.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include <QIODevice> #include <QIODevice>
#include <QXmlStreamReader> #include <QXmlStreamReader>
#include <QTextDocument>
#include <QFileInfo> #include <QFileInfo>
#include <QDir> #include <QDir>
#include <QPainter> #include <QPainter>
#include <QRegularExpression> #include <QRegularExpression>
#include <QSemaphore>
#include <QThreadPool>
#include <QAtomicInt> #include <QAtomicInt>
#include "utils.hh" #include "utils.hh"

View file

@ -5,7 +5,6 @@
#include "zim.hh" #include "zim.hh"
#include "btreeidx.hh" #include "btreeidx.hh"
#include "folding.hh" #include "folding.hh"
#include "gddebug.hh" #include "gddebug.hh"
#include "utf8.hh" #include "utf8.hh"
@ -23,14 +22,12 @@
#include <QAtomicInt> #include <QAtomicInt>
#include <QImage> #include <QImage>
#include <QDir> #include <QDir>
#include <QRegularExpression> #include <QRegularExpression>
#include <string> #include <string>
#include <set> #include <set>
#include <map> #include <map>
#include <algorithm> #include <algorithm>
#include <QtConcurrent> #include <QtConcurrentRun>
#include <utility> #include <utility>
#include "globalregex.hh" #include "globalregex.hh"
#include <zim/zim.h> #include <zim/zim.h>

View file

@ -2,8 +2,7 @@
#include <QString> #include <QString>
#include <QList> #include <QList>
#include <QtConcurrent> #include <QtConcurrentRun>
#include "dict/dictionary.hh" #include "dict/dictionary.hh"
#include "btreeidx.hh" #include "btreeidx.hh"
#include "fulltextsearch.hh" #include "fulltextsearch.hh"

View file

@ -1,14 +1,14 @@
/* This file is (c) 2014 Abs62 /* This file is (c) 2014 Abs62
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
#include "fulltextsearch.hh"
#include "ftshelpers.hh" #include "ftshelpers.hh"
#include "fulltextsearch.hh"
#include "gddebug.hh" #include "gddebug.hh"
#include "help.hh"
#include <QThreadPool>
#include <QMessageBox>
#include "globalregex.hh" #include "globalregex.hh"
#include "help.hh"
#include <QFutureSynchronizer>
#include <QMessageBox>
#include <QThreadPool>
namespace FTS { namespace FTS {

View file

@ -1,19 +1,10 @@
#pragma once #pragma once
#include <QAbstractListModel>
#include <QAction>
#include <QList>
#include <QTimer> #include <QTimer>
#include <QThread>
#include <QRunnable> #include <QRunnable>
#include <QSemaphore> #include <QSemaphore>
#include <QStringList>
#include <QRegularExpression>
#include "dict/dictionary.hh" #include "dict/dictionary.hh"
#include "ui_fulltextsearch.h" #include "ui_fulltextsearch.h"
#include "config.hh" #include "config.hh"
#include "instances.hh" #include "instances.hh"
#include "delegate.hh" #include "delegate.hh"