Created
February 1, 2012 20:19
-
-
Save Alir3z4/1719069 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std::vector<std::string> fromQVector(const QVector<QString> &qVect) | |
{ | |
std::vector<std::string> stdVect; | |
for (int i = 0; i < qVect.size(); ++i) { | |
stdVect.push_back(qVect[i].toStdString()); | |
} | |
return stdVect; | |
} | |
const std::map<std::string, std::string> Aria2c::fromQMap(const QMap<QString, QString> &qMap) | |
{ | |
std::map<std::string, std::string> stdMap; | |
QMap<QString, QString>::const_iterator i = qMap.constBegin(); | |
while (i != qMap.constEnd()) { | |
stdMap.insert(std::pair<std::string, std::string>(i.key().toStdString(), i.value().toStdString())); | |
} | |
return stdMap; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment