diff options
-rw-r--r-- | qml/components/ModelsSingleton.qml | 28 | ||||
-rw-r--r-- | src/applicationclient.cpp | 14 | ||||
-rw-r--r-- | src/fileio.cpp | 6 |
3 files changed, 24 insertions, 24 deletions
diff --git a/qml/components/ModelsSingleton.qml b/qml/components/ModelsSingleton.qml index e5f6e18..4dbf25b 100644 --- a/qml/components/ModelsSingleton.qml +++ b/qml/components/ModelsSingleton.qml @@ -179,7 +179,7 @@ QtObject { function saveFeedback(fbtext, eventId, rating) { - console.log("saveFeedback") + //console.log("saveFeedback") var reply = applicationClient.client.create({ "objectType": "objects.Feedback", "event": { @@ -189,23 +189,23 @@ QtObject { "rating": rating, "feedbackText": fbtext }) - reply.finished.connect(function() { - if (reply.errorType !== EnginioReply.NoError) { - console.log("Failed to save feedback.\n") - } else { - console.log("Successfully saved feedback.\n") - } - }) +// reply.finished.connect(function() { +// if (reply.errorType !== EnginioReply.NoError) { +// console.log("Failed to save feedback.\n") +// } else { +// console.log("Successfully saved feedback.\n") +// } +// }) } function saveFavorite(saveEventId) { if (busy) { - console.log("busy removing or saving favorite. Should we show some indicator here?") + //console.log("busy removing or saving favorite. Should we show some indicator here?") return } busy = true - console.log("start saving favorite") + //console.log("start saving favorite") var reply = applicationClient.client.create({ "objectType": "objects.Favorite", "favoriteEvent": { @@ -220,18 +220,18 @@ QtObject { else eventModel.addFavorite(saveEventId) busy = false - console.log("favorite save done") + //console.log("favorite save done") }) } function removeFavorite(removeEventId) { if (busy) { - console.log("busy removing or saving favorite. Should we show some indicator here?") + //console.log("busy removing or saving favorite. Should we show some indicator here?") return } busy = true - console.log("start removing favorite. First get the favorite id which should be removed") + //console.log("start removing favorite. First get the favorite id which should be removed") var favoriteQuery = applicationClient.client.query({ "objectType": "objects.Favorite", "query":{ @@ -258,7 +258,7 @@ QtObject { eventModel.removeFavorite(removeEventId) }) } - console.log("favorite remove done") + //console.log("favorite remove done") } busy = false }) diff --git a/src/applicationclient.cpp b/src/applicationclient.cpp index bf7ecdb..0887b23 100644 --- a/src/applicationclient.cpp +++ b/src/applicationclient.cpp @@ -85,14 +85,14 @@ ApplicationClient::ApplicationClient() void ApplicationClient::errorClient(EnginioReply *reply) { - qDebug() << "Error" << reply->errorString() << m_client->authenticationState(); + //qDebug() << "Error" << reply->errorString() << m_client->authenticationState(); emit error(reply->errorString()); reply->deleteLater(); } void ApplicationClient::getUserCredentials() { - qDebug() << "Get user credentials"; + //qDebug() << "Get user credentials"; QString cachedUserData = m_userData->read(); QStringList splitData = cachedUserData.split(" "); if (splitData.length() != 2) { @@ -106,7 +106,7 @@ void ApplicationClient::getUserCredentials() void ApplicationClient::createUser() { - qDebug() << "Create User"; + //qDebug() << "Create User"; currentUsername = m_userData->createUUID(); currentPassword = m_userData->createUUID(); QJsonObject query; @@ -120,10 +120,10 @@ void ApplicationClient::createUser() void ApplicationClient::userCreationReply(EnginioReply *reply) { if (reply->errorType() != Enginio::NoError) { - qDebug() << "Failed to create an user" << reply->errorString(); + //qDebug() << "Failed to create an user" << reply->errorString(); emit error(reply->errorString()); } else { - qDebug() << "User Created"; + //qDebug() << "User Created"; m_userData->write(QString("%1 %2").arg(currentUsername).arg(currentPassword)); authenticate(); } @@ -132,7 +132,7 @@ void ApplicationClient::userCreationReply(EnginioReply *reply) void ApplicationClient::authenticate() { - qDebug() << "Authenticate" << currentUsername; + //qDebug() << "Authenticate" << currentUsername; m_client->setIdentity(0); authenticator->setUser(currentUsername); authenticator->setPassword(currentPassword); @@ -141,7 +141,7 @@ void ApplicationClient::authenticate() void ApplicationClient::authenticationSuccess(EnginioReply *reply) { - qDebug() << "Query the conference"; + //qDebug() << "Query the conference"; int timeout = (reply->data().value("expires_in").toInt() - 20*60)*1000; timer->setSingleShot(true); timer->start(timeout); diff --git a/src/fileio.cpp b/src/fileio.cpp index 4cd7473..449bf83 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -77,7 +77,7 @@ QString FileIO::read() file.close(); } else { emit error("Unable to open the file"); - qDebug() << "unable to open file " << mSource; + //qDebug() << "unable to open file " << mSource; return QString(); } return fileContent; @@ -87,13 +87,13 @@ bool FileIO::write(const QString &data) { QFile file(mSource); if (!file.open(QFile::WriteOnly | QFile::Truncate)) { - qDebug() << "could not open file"; + //qDebug() << "could not open file"; return false; } QTextStream out(&file); out << data; - qDebug() << "data written " << data; + //qDebug() << "data written " << data; file.close(); return true; |