Commit 2b2995f3 authored by Janis Born's avatar Janis Born

get rid of some debug couts

parent 192c1545
Pipeline #1371 skipped
......@@ -72,15 +72,12 @@ void DidYouKnowWidget::updateTips()
QFileInfo libraryFileInfo(libraryFileName());
bool downloadNewLibrary = false;
if (!libraryFileInfo.exists()) {
std::cout << "No local tips library file found." << std::endl;
downloadNewLibrary = true;
}
else if (libraryFileInfo.lastModified().secsTo(QDateTime::currentDateTime()) > outdatedSeconds) {
std::cout << "Local tips library file is outdated." << std::endl;
downloadNewLibrary = true;
}
if (downloadNewLibrary) {
std::cout << "Downloading tips library from " << libraryURL.toString().toStdString() << " ..." << std::endl;
QNetworkAccessManager manager;
QNetworkRequest request(libraryURL);
QNetworkReply* reply = manager.get(request);
......@@ -103,7 +100,6 @@ void DidYouKnowWidget::updateTips()
QFile libraryFile(libraryFileName());
if (!libraryFile.open(QIODevice::ReadOnly)) {
// Try library file from local repository as fallback
std::cout << "Could not open " << libraryFile.fileName().toStdString() << ". Falling back to local library." << std::endl;
libraryFile.setFileName(":Plugin-DidYouKnow/Library/tips.json");
if (!libraryFile.open(QIODevice::ReadOnly)) {
throw ConfigError("Could not open " + libraryFile.fileName().toStdString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment