Skip to content

Commit

Permalink
Fix KUIT markup to avoid warnings and also add some more usage of mar…
Browse files Browse the repository at this point in the history
…kup.
  • Loading branch information
spersson committed May 4, 2015
1 parent d05070e commit 05c64e5
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 70 deletions.
4 changes: 2 additions & 2 deletions daemon/edexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void EDExecutor::startBackup() {
if(lInfo.isWritable()) {
BackupJob *lJob = createBackupJob();
if(lJob == NULL) {
KNotification::event(KNotification::Error, xi18nc("@title", "Problem"),
KNotification::event(KNotification::Error, xi18nc("@title:window", "Problem"),
xi18nc("notification", "Invalid type of backup in configuration."));
exitBackupRunningState(false);
return;
Expand Down Expand Up @@ -149,7 +149,7 @@ void EDExecutor::slotBackupDone(KJob *pJob) {

void EDExecutor::slotBackupSizeDone(KJob *pJob) {
if(pJob->error()) {
KNotification::event(KNotification::Error, xi18nc("@title", "Problem"), pJob->errorText());
KNotification::event(KNotification::Error, xi18nc("@title:window", "Problem"), pJob->errorText());
mPlan->mLastBackupSize = -1.0; //unknown size
} else {
KIO::DirectorySizeJob *lSizeJob = qobject_cast<KIO::DirectorySizeJob *>(pJob);
Expand Down
4 changes: 2 additions & 2 deletions daemon/fsexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void FSExecutor::checkStatus() {
void FSExecutor::startBackup() {
BackupJob *lJob = createBackupJob();
if(lJob == NULL) {
KNotification::event(KNotification::Error, xi18nc("@title", "Problem"),
KNotification::event(KNotification::Error, xi18nc("@title:window", "Problem"),
xi18nc("notification", "Invalid type of backup in configuration."));
exitBackupRunningState(false);
return;
Expand Down Expand Up @@ -135,7 +135,7 @@ void FSExecutor::slotBackupDone(KJob *pJob) {

void FSExecutor::slotBackupSizeDone(KJob *pJob) {
if(pJob->error()) {
KNotification::event(KNotification::Error, xi18nc("@title", "Problem"), pJob->errorText());
KNotification::event(KNotification::Error, xi18nc("@title:window", "Problem"), pJob->errorText());
mPlan->mLastBackupSize = -1.0; //unknown size
} else {
KIO::DirectorySizeJob *lSizeJob = qobject_cast<KIO::DirectorySizeJob *>(pJob);
Expand Down
16 changes: 9 additions & 7 deletions daemon/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,21 @@
#include <QCommandLineParser>

extern "C" int Q_DECL_EXPORT kdemain(int argc, char *argv[]) {
KupDaemon *lDaemon = new KupDaemon();
if(!lDaemon->shouldStart()) {
qCritical() <<ki18n("Kup is not enabled, enable it from the system settings module. "
"You can do that by running 'kcmshell5 kup'").toString();
return 0;
}

QApplication lApp(argc, argv);
lApp.setQuitOnLastWindowClosed(false);
lApp.setAttribute(Qt::AA_UseHighDpiPixmaps, true);

KLocalizedString::setApplicationDomain("kup");

KupDaemon *lDaemon = new KupDaemon();
if(!lDaemon->shouldStart()) {
qCritical("%s", xi18nc("@info:shell Error message at startup",
"Kup is not enabled, enable it from the "
"system settings module. You can do that by running "
"<command>kcmshell5 kup</command>").toLocal8Bit().constData());
return 0;
}

KAboutData lAbout(QStringLiteral("kupdaemon"), xi18nc("@title", "Kup Daemon"), QStringLiteral("0.5.1"),
i18n("Kup is a flexible backup solution using the backup storage system 'bup'. "
"This allows it to quickly perform incremental backups, only saving the "
Expand Down
11 changes: 6 additions & 5 deletions filedigger/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ int main(int pArgCount, char **pArgArray) {
lAbout.processCommandLine(&lParser);

if(lParser.positionalArguments().count() != 1) {
qCritical() << xi18nc("Error message at startup",
// this very convoluted call is just to stop Qt from adding quotation marks around the text output
qCritical("%s", i18nc("@info:shell Error message at startup",
"You must supply the path to a bup or git repository that "
"you wish to open for viewing.");
"you wish to open for viewing.").toLocal8Bit().constData());
return -1;
}

Expand All @@ -72,14 +73,14 @@ int main(int pArgCount, char **pArgArray) {
MergedRepository *lRepository = new MergedRepository(NULL, lParser.positionalArguments().first(),
lParser.value("branch"));
if(!lRepository->open()) {
KMessageBox::sorry(NULL, xi18nc("@info:label messagebox, %1 is a folder path",
"The backup archive \"%1\" could not be opened. Check if the backups really are located there.",
KMessageBox::sorry(NULL, xi18nc("@info messagebox, %1 is a folder path",
"The backup archive <filename>%1</filename> could not be opened. Check if the backups really are located there.",
lParser.positionalArguments().first()));
return 1;
}
if(!lRepository->readBranch()) {
if(!lRepository->permissionsOk()) {
KMessageBox::sorry(NULL, xi18nc("@info:label messagebox",
KMessageBox::sorry(NULL, xi18nc("@info messagebox",
"You do not have permission needed to read this backup archive."));
return 2;
} else {
Expand Down
4 changes: 2 additions & 2 deletions filedigger/mergedvfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ MergedNodeList &MergedNode::subNodes() {
}

void MergedNode::askForIntegrityCheck() {
int lAnswer = KMessageBox::questionYesNo(NULL, xi18nc("@info:label messagebox",
int lAnswer = KMessageBox::questionYesNo(NULL, xi18nc("@info messagebox",
"Could not read this backup archive. Perhaps some files "
"have become corrupted. Do you want to run an integrity "
"check to test this?"));
Expand Down Expand Up @@ -241,7 +241,7 @@ bool MergedRepository::readBranch() {
QString lCompleteBranchName = QString::fromLatin1("refs/heads/");
lCompleteBranchName.append(mBranchName);
if(0 != git_revwalk_push_ref(lRevisionWalker, lCompleteBranchName.toLocal8Bit())) {
qWarning() << "Unable to read branch \"" << mBranchName << "\" in repository " << objectName();
qWarning() << "Unable to read branch " << mBranchName << " in repository " << objectName();
git_revwalk_free(lRevisionWalker);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion filedigger/restoredialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string comment="@title: window">Restore Guide</string>
<string comment="@title:window">Restore Guide</string>
</property>
<layout class="QVBoxLayout" name="mTopLevelVLayout">
<item>
Expand Down
Loading

0 comments on commit 05c64e5

Please sign in to comment.