Originally Posted by
wysota
And the exact line triggering the error (downloader.h:17 and :77)?
== give me the source code :|
#ifndef DOWNLOADER_H
#define DOWNLOADER_H
#include <QObject>
#include <QString>
#include <QVector>
#include <QMap>
#include "yoDownloaders/aria2c.h"
{
Q_OBJECT
public:
explicit Downloader
(QObject *parent
= 0);
// Operations :|
const QString addUri
(const QVector<QString>
&uris
);
QString addUri
(QVector<QString>
&uris, QMap<QString, QString>
&options
);
private:
Aria2c aria2;
};
#endif // DOWNLOADER_H
#ifndef DOWNLOADER_H
#define DOWNLOADER_H
#include <QObject>
#include <QString>
#include <QVector>
#include <QMap>
#include "yoDownloaders/aria2c.h"
class Downloader : public QObject
{
Q_OBJECT
public:
explicit Downloader(QObject *parent = 0);
// Operations :|
const QString addUri(const QVector<QString> &uris);
QString addUri(QVector<QString> &uris, QMap<QString, QString> &options);
private:
Aria2c aria2;
};
#endif // DOWNLOADER_H
To copy to clipboard, switch view to plain text mode
i make a function for it actually to make things work :|, but this is for QMap<QString, QString>
i don't know it's working or not yet!
const std::map<std::string, std::string> Aria2c::fromQMap(const QMap<QString, QString> &q_map)
{
std::map<std::string, std::string> std_map;
QMap<QString, QString>::const_iterator i = q_map.constBegin();
while (i != q_map.constEnd()) {
std_map.insert(std::pair<std::string, std::string>(i.key().toStdString(), i.value().toStdString()));
}
return std_map;
}
const std::map<std::string, std::string> Aria2c::fromQMap(const QMap<QString, QString> &q_map)
{
std::map<std::string, std::string> std_map;
QMap<QString, QString>::const_iterator i = q_map.constBegin();
while (i != q_map.constEnd()) {
std_map.insert(std::pair<std::string, std::string>(i.key().toStdString(), i.value().toStdString()));
}
return std_map;
}
To copy to clipboard, switch view to plain text mode
just for information, it works
Bookmarks