summaryrefslogtreecommitdiffstats
path: root/src/backup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/backup.cpp')
-rw-r--r--src/backup.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/backup.cpp b/src/backup.cpp
index 2076694..86ae3c6 100644
--- a/src/backup.cpp
+++ b/src/backup.cpp
@@ -28,7 +28,7 @@
#include <tqhbox.h>
#include <tqvbox.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <tqpushbutton.h>
#include <klocale.h>
@@ -65,7 +65,7 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name)
savesFolder = savesFolder.left(savesFolder.length() - 1); // savesFolder ends with "/"
TQGroupBox *folderGroup = new TQGroupBox(1, Qt::Horizontal, i18n("Save Folder"), page);
- new TQLabel("<qt><nobr>" + i18n("Your baskets are currently stored in that folder:<br><b>%1</b>").arg(savesFolder), folderGroup);
+ new TQLabel("<qt><nobr>" + i18n("Your baskets are currently stored in that folder:<br><b>%1</b>").tqarg(savesFolder), folderGroup);
TQWidget *folderWidget = new TQWidget(folderGroup);
TQHBoxLayout *folderLayout = new TQHBoxLayout(folderWidget, 0, spacingHint());
TQPushButton *moveFolder = new TQPushButton(i18n("&Move to Another Folder..."), folderWidget);
@@ -77,9 +77,9 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name)
"In this case, mount the shared-folder to the local file system and ask %2 to use that mount point.<br>"
"Warning: you should not run %3 at the same time on both computers, or you risk to loss data while the two applications are desynced.</li>"
"</ul><p>Please remember that you should not change the content of that folder manually (eg. adding a file in a basket folder will not add that file to the basket).</p>")
- .arg(kapp->aboutData()->programName())
- .arg(kapp->aboutData()->programName())
- .arg(kapp->aboutData()->programName()),
+ .tqarg(kapp->aboutData()->programName())
+ .tqarg(kapp->aboutData()->programName())
+ .tqarg(kapp->aboutData()->programName()),
folderWidget);
folderLayout->addWidget(moveFolder);
folderLayout->addWidget(useFolder);
@@ -103,7 +103,7 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name)
populateLastBackup();
- (new TQWidget(page))->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
+ (new TQWidget(page))->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
BackupDialog::~BackupDialog()
@@ -114,7 +114,7 @@ void BackupDialog::populateLastBackup()
{
TQString lastBackupText = i18n("Last backup: never");
if (Settings::lastBackup().isValid())
- lastBackupText = i18n("Last backup: %1").arg(Settings::lastBackup().toString(Qt::LocalDate));
+ lastBackupText = i18n("Last backup: %1").tqarg(Settings::lastBackup().toString(Qt::LocalDate));
m_lastBackup->setText(lastBackupText);
}
@@ -135,7 +135,7 @@ void BackupDialog::moveToAnotherFolder()
if (content.count() > 2) { // "." and ".."
int result = KMessageBox::questionYesNo(
0,
- "<qt>" + i18n("The folder <b>%1</b> is not empty. Do you want to override it?").arg(folder),
+ "<qt>" + i18n("The folder <b>%1</b> is not empty. Do you want to override it?").tqarg(folder),
i18n("Override Folder?"),
KGuiItem(i18n("&Override"), "filesave")
);
@@ -170,7 +170,7 @@ void BackupDialog::backup()
config->setGroup("Backups");
TQString folder = config->readEntry("lastFolder", TQDir::homeDirPath()) + "/";
TQString fileName = i18n("Backup filename (without extension), %1 is the date", "Baskets_%1")
- .arg(TQDate::currentDate().toString(Qt::ISODate));
+ .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate));
TQString url = folder + fileName;
// Ask a file name & path to the user:
@@ -187,7 +187,7 @@ void BackupDialog::backup()
int result = KMessageBox::questionYesNoCancel(
0,
"<qt>" + i18n("The file <b>%1</b> already exists. Do you really want to override it?")
- .arg(KURL(destination).fileName()),
+ .tqarg(KURL(destination).fileName()),
i18n("Override File?"),
KGuiItem(i18n("&Override"), "filesave")
);
@@ -216,7 +216,7 @@ void BackupDialog::backup()
usleep(300); // Not too long because if the backup process is finished, we wait for nothing
}
- Settings::setLastBackup(TQDate::currentDate());
+ Settings::setLastBackup(TQDate::tqcurrentDate());
Settings::saveConfig();
populateLastBackup();
}
@@ -245,7 +245,7 @@ void BackupDialog::restore()
TQFile file(readmePath);
if (file.open(IO_WriteOnly)) {
TQTextStream stream(&file);
- stream << i18n("This is a safety copy of your baskets like they were before you started to restore the backup %1.").arg(KURL(path).fileName()) + "\n\n"
+ stream << i18n("This is a safety copy of your baskets like they were before you started to restore the backup %1.").tqarg(KURL(path).fileName()) + "\n\n"
<< i18n("If the restoration was a success and you restored what you wanted to restore, you can remove this folder.") + "\n\n"
<< i18n("If something went wrong during the restoration process, you can re-use this folder to store your baskets and nothing will be lost.") + "\n\n"
<< i18n("Choose \"Basket\" -> \"Backup & Restore...\" -> \"Use Another Existing Folder...\" and select that folder.") + "\n";
@@ -253,8 +253,8 @@ void BackupDialog::restore()
}
TQString message =
- "<p><nobr>" + i18n("Restoring <b>%1</b>. Please wait...").arg(KURL(path).fileName()) + "</nobr></p><p>" +
- i18n("If something goes wrong during the restoration process, read the file <b>%1</b>.").arg(readmePath);
+ "<p><nobr>" + i18n("Restoring <b>%1</b>. Please wait...").tqarg(KURL(path).fileName()) + "</nobr></p><p>" +
+ i18n("If something goes wrong during the restoration process, read the file <b>%1</b>.").tqarg(readmePath);
KProgressDialog *dialog = new KProgressDialog(0, 0, i18n("Restore Baskets"), message, /*modal=*/true);
dialog->setAllowCancel(false);
@@ -332,7 +332,7 @@ void Backup::setFolderAndRestart(const TQString &folder, const TQString &message
// This is important for users to trust the application in such a critical phase and understands what's happening:
KMessageBox::information(
0,
- "<qt>" + message.arg(
+ "<qt>" + message.tqarg(
(folder.endsWith("/") ? folder.left(folder.length() - 1) : folder),
kapp->aboutData()->programName()),
i18n("Restart")
@@ -353,7 +353,7 @@ TQString Backup::newSafetyFolder()
return fullPath;
for (int i = 2; ; ++i) {
- fullPath = TQDir::homeDirPath() + "/" + i18n("Safety folder name before restoring a basket data archive", "Baskets Before Restoration (%1)").arg(i) + "/";
+ fullPath = TQDir::homeDirPath() + "/" + i18n("Safety folder name before restoring a basket data archive", "Baskets Before Restoration (%1)").tqarg(i) + "/";
if (!dir.exists(fullPath))
return fullPath;
}