Implement class for handling filesystem paths

PR #15915.
This commit is contained in:
Vladimir Golovnev
2022-02-08 06:03:48 +03:00
committed by GitHub
parent facfa26eed
commit dd1bd8ad10
131 changed files with 2252 additions and 1868 deletions

View File

@@ -26,13 +26,15 @@
* exception statement from your version.
*/
#include "geoipdatabase.h"
#include <QDateTime>
#include <QDebug>
#include <QFile>
#include <QHostAddress>
#include <QVariant>
#include "geoipdatabase.h"
#include "base/path.h"
namespace
{
@@ -84,10 +86,10 @@ GeoIPDatabase::GeoIPDatabase(const quint32 size)
{
}
GeoIPDatabase *GeoIPDatabase::load(const QString &filename, QString &error)
GeoIPDatabase *GeoIPDatabase::load(const Path &filename, QString &error)
{
GeoIPDatabase *db = nullptr;
QFile file(filename);
QFile file {filename.data()};
if (file.size() > MAX_FILE_SIZE)
{
error = tr("Unsupported database file size.");