Commit 14fa24bb authored by Karel Slaný's avatar Karel Slaný

Changed some strings.

parent 48f69c65
......@@ -183,7 +183,7 @@ Component {
image: "qrc:/ui/attach-to-mail.svg"
showEntry: true
showNext: false
name: qsTr("Send zfo message by email")
name: qsTr("Send message zfo by email")
funcName: "sendZfoEmail"
}
ListElement {
......
......@@ -265,11 +265,13 @@ void Files::sendMsgFilesWithEmail(const QString &userName, qint64 msgId,
GlobInstcs::setPtr->dbsLocation, userName,
(*GlobInstcs::acntMapPtr)[userName].storeToDisk());
if (msgDb == Q_NULLPTR) {
qCritical() << "ERROR: Message database cannot open!";
qCritical("Cannot open message database for '%s'.",
userName.toUtf8().constData());
return;
}
if (!msgDb->getMessageDataForEmail(msgId, body, subject)) {
qCritical() << "ERROR: Message data mssing!";
qCritical("Missing data of message '%s'.",
QString::number(msgId).toUtf8().constData());
return;
}
......@@ -281,13 +283,15 @@ void Files::sendMsgFilesWithEmail(const QString &userName, qint64 msgId,
GlobInstcs::setPtr->dbsLocation, userName,
(*GlobInstcs::acntMapPtr)[userName].storeToDisk());
if (fDb == Q_NULLPTR) {
qCritical() << "ERROR: File database cannot open!";
qCritical("Cannot open file database for '%s'.",
userName.toUtf8().constData());
return;
}
filelist = fDb->getFilesFromDb(msgId);
if (filelist.isEmpty()) {
qCritical() << "ERROR: File list is empty!";
qCritical("Missing attachments for message '%s'.",
QString::number(msgId).toUtf8().constData());
return;
}
}
......@@ -295,10 +299,11 @@ void Files::sendMsgFilesWithEmail(const QString &userName, qint64 msgId,
/* Get zfo file from database if needed */
if (attachFlags & MSG_ZFO) {
FileDb::FileData msgData;
msgData.content = GlobInstcs::zfoDbPtr->getZfoContentFromDb(msgId,
(*GlobInstcs::acntMapPtr)[userName].isTestAccount());
msgData.content = GlobInstcs::zfoDbPtr->getZfoContentFromDb(
msgId, (*GlobInstcs::acntMapPtr)[userName].isTestAccount());
if (msgData.content.isEmpty()) {
qCritical() << "ERROR: ZFO message data missing!";
qCritical("Missing zfo data for message '%s'.",
QString::number(msgId).toUtf8().constData());
Dialogues::errorMessage(Dialogues::CRITICAL,
tr("ZFO missing"),
tr("ZFO message is not present in local database."),
......@@ -321,7 +326,7 @@ void Files::sendMsgFilesWithEmail(const QString &userName, qint64 msgId,
foreach (const FileDb::FileData &file, filelist) {
QString fileName = file.filename;
if (fileName.isEmpty()) {
qCritical() << "ERROR: File name is empty!";
qCritical("%s", "File name is empty.");
return;
}
fileName = writeFile(targetPath, fileName,
......
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