mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
cmake: set warning and error options
The set is far from perfect, but guards against common errors with GCC.
This commit is contained in:
@@ -2,6 +2,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
set(CMAKE_CXX_STANDARD "11")
|
||||
add_definitions(-DBOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
include(MacroQbtCompilerSettings)
|
||||
qbt_set_compiler_options()
|
||||
|
||||
include(MacroLinkQtComponents)
|
||||
include(QbtTargetSources)
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
// Search data
|
||||
mutable QHash<quint32, QString> m_countries;
|
||||
quint32 m_size;
|
||||
const uchar *m_data;
|
||||
uchar *m_data;
|
||||
};
|
||||
|
||||
#endif // GEOIPDATABASE_H
|
||||
|
||||
@@ -121,7 +121,7 @@ Http::Response AbstractWebApplication::processRequest(const Http::Request &reque
|
||||
print(QObject::tr("Your IP address has been banned after too many failed authentication attempts."), Http::CONTENT_TYPE_TXT);
|
||||
}
|
||||
else {
|
||||
processRequest();
|
||||
doProcessRequest();
|
||||
}
|
||||
|
||||
return response();
|
||||
|
||||
@@ -54,10 +54,10 @@ public:
|
||||
explicit AbstractWebApplication(QObject *parent = 0);
|
||||
virtual ~AbstractWebApplication();
|
||||
|
||||
Http::Response processRequest(const Http::Request &request, const Http::Environment &env);
|
||||
Http::Response processRequest(const Http::Request &request, const Http::Environment &env) final;
|
||||
|
||||
protected:
|
||||
virtual void processRequest() = 0;
|
||||
virtual void doProcessRequest() = 0;
|
||||
|
||||
bool isBanned() const;
|
||||
int failedAttempts() const;
|
||||
|
||||
@@ -814,7 +814,7 @@ bool WebApplication::isPublicScope()
|
||||
return (scope_ == DEFAULT_SCOPE || scope_ == VERSION_INFO);
|
||||
}
|
||||
|
||||
void WebApplication::processRequest()
|
||||
void WebApplication::doProcessRequest()
|
||||
{
|
||||
scope_ = DEFAULT_SCOPE;
|
||||
action_ = DEFAULT_ACTION;
|
||||
|
||||
@@ -103,7 +103,7 @@ private:
|
||||
QString action_;
|
||||
QStringList args_;
|
||||
|
||||
void processRequest();
|
||||
void doProcessRequest() override;
|
||||
|
||||
bool isPublicScope();
|
||||
void parsePath();
|
||||
|
||||
Reference in New Issue
Block a user