Use Niels Lohmann's JSON library everywhere

We started to use Niels Lohmann's JSON library instead of the one
included in Qt for the Export JSON dialog a while ago because Qt's
implementation showed some problems. To avoid any similar issues and
because Niels' library has a much nicer API, this commit migrates all
our code to his library.
This commit is contained in:
Martin Kleusberg
2019-05-02 19:57:28 +02:00
parent b803e3c49f
commit d344f396b2
7 changed files with 100 additions and 100 deletions

View File

@@ -61,11 +61,11 @@ signals:
// a directory listing or the licence list.
void gotDirList(QString json, QVariant userdata);
void gotCurrentVersion(QString version, QString url);
void gotLicenceList(QMap<QString, QString> licences);
void gotBranchList(QStringList branches, QString default_branch);
void gotLicenceList(QMap<std::string, std::string> licences);
void gotBranchList(std::vector<std::string> branches, std::string default_branch);
// The uploadFinished() signal is emitted when a push() call is finished, i.e. a database upload has completed.
void uploadFinished(QString url);
void uploadFinished(std::string url);
private:
void gotEncrypted(QNetworkReply* reply);
@@ -77,10 +77,10 @@ private:
// Helper functions for managing the list of locally available databases
void localAssureOpened();
QString localAdd(QString filename, QString identity, const QUrl& url, const QString& new_commit_id);
QString localAdd(QString filename, QString identity, const QUrl& url, const std::string& new_commit_id);
QString localExists(const QUrl& url, QString identity);
QString localCheckFile(const QString& local_file);
QString localLastCommitId(QString clientCert, const QUrl& url);
std::string localLastCommitId(QString clientCert, const QUrl& url);
// Helper functions for building multi-part HTTP requests
void addPart(QHttpMultiPart* multipart, const QString& name, const QString& value);