summaryrefslogtreecommitdiffstats
path: root/src/dolphin.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 00:40:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-27 00:40:29 +0000
commit7a741e43ff09e70396a918956219b8316c48e522 (patch)
tree3d0f60eccd59786cea7236db2d5c4c1f25874515 /src/dolphin.cpp
parenta48487ef0c329434b58b6f920111bb0999f1109e (diff)
downloaddolphin-7a741e43ff09e70396a918956219b8316c48e522.tar.gz
dolphin-7a741e43ff09e70396a918956219b8316c48e522.zip
TQt4 port Dolphin
This enables compilation under Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/dolphin@1229359 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/dolphin.cpp')
-rw-r--r--src/dolphin.cpp272
1 files changed, 136 insertions, 136 deletions
diff --git a/src/dolphin.cpp b/src/dolphin.cpp
index 0e81b6b..2b8ddb8 100644
--- a/src/dolphin.cpp
+++ b/src/dolphin.cpp
@@ -52,8 +52,8 @@
#include <kstandarddirs.h>
#include <krun.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
#include "urlnavigator.h"
#include "viewpropertiesdialog.h"
@@ -132,7 +132,7 @@ void Dolphin::dropURLs(const KURL::List& urls,
popup.insertItem(SmallIcon("stop"), i18n("Cancel"), 3);
popup.setAccel(i18n("Escape"), 3);
- selectedIndex = popup.exec(QCursor::pos());
+ selectedIndex = popup.exec(TQCursor::pos());
}
if (selectedIndex < 0) {
@@ -267,10 +267,10 @@ void Dolphin::slotSortingChanged(DolphinView::Sorting sorting)
}
}
-void Dolphin::slotSortOrderChanged(Qt::SortOrder order)
+void Dolphin::slotSortOrderChanged(TQt::SortOrder order)
{
KToggleAction* descending = static_cast<KToggleAction*>(actionCollection()->action("descending"));
- const bool sortDescending = (order == Qt::Descending);
+ const bool sortDescending = (order == TQt::Descending);
descending->setChecked(sortDescending);
}
@@ -292,7 +292,7 @@ void Dolphin::slotSelectionChanged()
emit selectionChanged();
}
-void Dolphin::closeEvent(QCloseEvent* event)
+void Dolphin::closeEvent(TQCloseEvent* event)
{
KConfig* config = kapp->config();
config->setGroup("General");
@@ -363,8 +363,8 @@ void Dolphin::createFolder()
DolphinStatusBar* statusBar = m_activeView->statusBar();
const KURL baseURL(m_activeView->url());
- QString name(i18n("New Folder"));
- if (baseURL.isLocalFile() && QFileInfo(baseURL.path(+1) + name).exists()) {
+ TQString name(i18n("New Folder"));
+ if (baseURL.isLocalFile() && TQFileInfo(baseURL.path(+1) + name).exists()) {
name = KIO::RenameDlg::suggestName(baseURL, i18n("New Folder"));
}
@@ -395,7 +395,7 @@ void Dolphin::createFolder()
// TODO: provide message type hint
if (ok) {
- statusBar->setMessage(i18n("Created folder %1.").arg(url.path()),
+ statusBar->setMessage(i18n("Created folder %1.").tqarg(url.path()),
DolphinStatusBar::OperationCompleted);
DolphinCommand command(DolphinCommand::CreateFolder, KURL::List(), url);
@@ -405,11 +405,11 @@ void Dolphin::createFolder()
// Creating of the folder has been failed. Check whether the creating
// has been failed because a folder with the same name exists...
if (KIO::NetAccess::exists(url, true, this)) {
- statusBar->setMessage(i18n("A folder named %1 already exists.").arg(url.path()),
+ statusBar->setMessage(i18n("A folder named %1 already exists.").tqarg(url.path()),
DolphinStatusBar::Error);
}
else {
- statusBar->setMessage(i18n("Creating of folder %1 failed.").arg(url.path()),
+ statusBar->setMessage(i18n("Creating of folder %1 failed.").tqarg(url.path()),
DolphinStatusBar::Error);
}
@@ -426,12 +426,12 @@ void Dolphin::createFile()
clearStatusBar();
- // TODO: const Entry& entry = m_createFileTemplates[QString(sender->name())];
+ // TODO: const Entry& entry = m_createFileTemplates[TQString(sender->name())];
// should be enough. Anyway: the implemantation of [] does a linear search internally too.
- KSortableValueList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin();
- KSortableValueList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end();
+ KSortableValueList<CreateFileEntry, TQString>::ConstIterator it = m_createFileTemplates.begin();
+ KSortableValueList<CreateFileEntry, TQString>::ConstIterator end = m_createFileTemplates.end();
- const QString senderName(sender()->name());
+ const TQString senderName(TQT_TQOBJECT(sender())->name());
bool found = false;
CreateFileEntry entry;
while (!found && (it != end)) {
@@ -445,30 +445,30 @@ void Dolphin::createFile()
}
DolphinStatusBar* statusBar = m_activeView->statusBar();
- if (!found || !QFile::exists(entry.templatePath)) {
+ if (!found || !TQFile::exists(entry.templatePath)) {
statusBar->setMessage(i18n("Could not create file."), DolphinStatusBar::Error);
return;
}
// Get the source path of the template which should be copied.
// The source path is part of the URL entry of the desktop file.
- const int pos = entry.templatePath.findRev('/');
- QString sourcePath(entry.templatePath.left(pos + 1));
+ const int pos = entry.templatePath.tqfindRev('/');
+ TQString sourcePath(entry.templatePath.left(pos + 1));
sourcePath += KDesktopFile(entry.templatePath, true).readPathEntry("URL");
- QString name(i18n(entry.name.ascii()));
+ TQString name(i18n(entry.name.ascii()));
// Most entry names end with "..." (e. g. "HTML File..."), which is ok for
// menus but no good choice for a new file name -> remove the dots...
- name.replace("...", QString::null);
+ name.tqreplace("...", TQString());
// add the file extension to the name
- name.append(sourcePath.right(sourcePath.length() - sourcePath.findRev('.')));
+ name.append(sourcePath.right(sourcePath.length() - sourcePath.tqfindRev('.')));
// Check whether a file with the current name already exists. If yes suggest automatically
// a unique file name (e. g. "HTML File" will be replaced by "HTML File_1").
const KURL viewURL(m_activeView->url());
const bool fileExists = viewURL.isLocalFile() &&
- QFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists();
+ TQFileInfo(viewURL.path(+1) + KIO::encodeFileName(name)).exists();
if (fileExists) {
name = KIO::RenameDlg::suggestName(viewURL, name);
}
@@ -487,10 +487,10 @@ void Dolphin::createFile()
// before copying the template to the destination path check whether a file
// with the given name already exists
- const QString destPath(viewURL.prettyURL() + "/" + KIO::encodeFileName(name));
+ const TQString destPath(viewURL.prettyURL() + "/" + KIO::encodeFileName(name));
const KURL destURL(destPath);
if (KIO::NetAccess::exists(destURL, false, this)) {
- statusBar->setMessage(i18n("A file named %1 already exists.").arg(name),
+ statusBar->setMessage(i18n("A file named %1 already exists.").tqarg(name),
DolphinStatusBar::Error);
return;
}
@@ -500,7 +500,7 @@ void Dolphin::createFile()
KIO::CopyJob* job = KIO::copyAs(sourceURL, destURL);
job->setDefaultPermissions(true);
if (KIO::NetAccess::synchronousRun(job, this)) {
- statusBar->setMessage(i18n("Created file %1.").arg(name),
+ statusBar->setMessage(i18n("Created file %1.").tqarg(name),
DolphinStatusBar::OperationCompleted);
KURL::List list;
@@ -510,7 +510,7 @@ void Dolphin::createFile()
}
else {
- statusBar->setMessage(i18n("Creating of file %1 failed.").arg(name),
+ statusBar->setMessage(i18n("Creating of file %1 failed.").tqarg(name),
DolphinStatusBar::Error);
}
}
@@ -537,26 +537,26 @@ void Dolphin::deleteItems()
const uint itemCount = list.count();
assert(itemCount >= 1);
- QString text;
+ TQString text;
if (itemCount > 1) {
- text = i18n("Do you really want to delete the %1 selected items?").arg(itemCount);
+ text = i18n("Do you really want to delete the %1 selected items?").tqarg(itemCount);
}
else {
const KURL& url = list.first();
- text = i18n("Do you really want to delete '%1'?").arg(url.fileName());
+ text = i18n("Do you really want to delete '%1'?").tqarg(url.fileName());
}
const bool del = KMessageBox::warningContinueCancel(this,
text,
- QString::null,
+ TQString(),
KGuiItem(i18n("Delete"), SmallIcon("editdelete"))
) == KMessageBox::Continue;
if (del) {
KIO::Job* job = KIO::del(list);
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotHandleJobError(KIO::Job*)));
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotDeleteFileFinished(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotHandleJobError(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotDeleteFileFinished(KIO::Job*)));
}
}
@@ -613,7 +613,7 @@ void Dolphin::slotUndoAvailable(bool available)
}
}
-void Dolphin::slotUndoTextChanged(const QString& text)
+void Dolphin::slotUndoTextChanged(const TQString& text)
{
KAction* undoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Undo));
if (undoAction != 0) {
@@ -629,7 +629,7 @@ void Dolphin::slotRedoAvailable(bool available)
}
}
-void Dolphin::slotRedoTextChanged(const QString& text)
+void Dolphin::slotRedoTextChanged(const TQString& text)
{
KAction* redoAction = actionCollection()->action(KStdAction::stdName(KStdAction::Redo));
if (redoAction != 0) {
@@ -640,23 +640,23 @@ void Dolphin::slotRedoTextChanged(const QString& text)
void Dolphin::cut()
{
m_clipboardContainsCutData = true;
- QDragObject* data = new KURLDrag(m_activeView->selectedURLs(),
+ TQDragObject* data = new KURLDrag(m_activeView->selectedURLs(),
widget());
- QApplication::clipboard()->setData(data);
+ TQApplication::tqclipboard()->setData(data);
}
void Dolphin::copy()
{
m_clipboardContainsCutData = false;
- QDragObject* data = new KURLDrag(m_activeView->selectedURLs(),
+ TQDragObject* data = new KURLDrag(m_activeView->selectedURLs(),
widget());
- QApplication::clipboard()->setData(data);
+ TQApplication::tqclipboard()->setData(data);
}
void Dolphin::paste()
{
- QClipboard* clipboard = QApplication::clipboard();
- QMimeSource* data = clipboard->data();
+ TQClipboard* clipboard = TQApplication::tqclipboard();
+ TQMimeSource* data = clipboard->data();
if (!KURLDrag::canDecode(data)) {
return;
}
@@ -702,9 +702,9 @@ void Dolphin::updatePasteAction()
return;
}
- QString text(i18n("Paste"));
- QClipboard* clipboard = QApplication::clipboard();
- QMimeSource* data = clipboard->data();
+ TQString text(i18n("Paste"));
+ TQClipboard* clipboard = TQApplication::tqclipboard();
+ TQMimeSource* data = clipboard->data();
if (KURLDrag::canDecode(data)) {
pasteAction->setEnabled(true);
@@ -715,7 +715,7 @@ void Dolphin::updatePasteAction()
pasteAction->setText(i18n("Paste 1 File"));
}
else {
- pasteAction->setText(i18n("Paste %1 Files").arg(count));
+ pasteAction->setText(i18n("Paste %1 Files").tqarg(count));
}
}
else {
@@ -786,9 +786,9 @@ void Dolphin::sortByDate()
void Dolphin::toggleSortOrder()
{
- const Qt::SortOrder order = (m_activeView->sortOrder() == Qt::Ascending) ?
- Qt::Descending :
- Qt::Ascending;
+ const TQt::SortOrder order = (m_activeView->sortOrder() == TQt::Ascending) ?
+ TQt::Descending :
+ TQt::Ascending;
m_activeView->setSortOrder(order);
}
@@ -803,7 +803,7 @@ void Dolphin::toggleSplitView()
m_view[PrimaryIdx]->mode(),
m_view[PrimaryIdx]->isShowHiddenFilesEnabled());
- QValueList<int> list = m_splitter->sizes();
+ TQValueList<int> list = m_splitter->sizes();
assert(!list.isEmpty());
list.pop_back();
list.append(newWidth);
@@ -922,7 +922,7 @@ void Dolphin::goHome()
void Dolphin::openTerminal()
{
- QString command("konsole --workdir \"");
+ TQString command("konsole --workdir \"");
command.append(m_activeView->url().path());
command.append('\"');
@@ -931,7 +931,7 @@ void Dolphin::openTerminal()
void Dolphin::findFile()
{
- KRun::run("kfind", m_activeView->url());
+ KRun::run("ktqfind", m_activeView->url());
}
void Dolphin::compareFiles()
@@ -980,7 +980,7 @@ void Dolphin::compareFiles()
}
}
- QString command("kompare -c \"");
+ TQString command("kompare -c \"");
command.append(urlA.prettyURL());
command.append("\" \"");
command.append(urlB.prettyURL());
@@ -1005,8 +1005,8 @@ void Dolphin::addUndoOperation(KIO::Job* job)
const int id = job->progressId();
// set iterator to the executed command with the current id...
- QValueList<UndoInfo>::Iterator it = m_pendingUndoJobs.begin();
- const QValueList<UndoInfo>::Iterator end = m_pendingUndoJobs.end();
+ TQValueList<UndoInfo>::Iterator it = m_pendingUndoJobs.begin();
+ const TQValueList<UndoInfo>::Iterator end = m_pendingUndoJobs.end();
bool found = false;
while (!found && (it != end)) {
if ((*it).id == id) {
@@ -1024,7 +1024,7 @@ void Dolphin::addUndoOperation(KIO::Job* job)
// all source URLs must be updated with the trash URL. E. g. when moving
// a file "test.txt" and a second file "test.txt" to the trash,
// then the filenames in the trash are "0-test.txt" and "1-test.txt".
- QMap<QString, QString> metaData = job->metaData();
+ TQMap<TQString, TQString> metaData = job->metaData();
KURL::List newSourceURLs;
KURL::List sourceURLs = command.source();
@@ -1032,7 +1032,7 @@ void Dolphin::addUndoOperation(KIO::Job* job)
const KURL::List::Iterator sourceEnd = sourceURLs.end();
while (sourceIt != sourceEnd) {
- QMap<QString, QString>::ConstIterator metaIt = metaData.find("trashURL-" + (*sourceIt).path());
+ TQMap<TQString, TQString>::ConstIterator metaIt = metaData.tqfind("trashURL-" + (*sourceIt).path());
if (metaIt != metaData.end()) {
newSourceURLs.append(KURL(metaIt.data()));
}
@@ -1095,7 +1095,7 @@ void Dolphin::init()
setAcceptDrops(true);
- m_splitter = new QSplitter(this);
+ m_splitter = new TQSplitter(this);
DolphinSettings& settings = DolphinSettings::instance();
@@ -1144,9 +1144,9 @@ void Dolphin::init()
stateChanged("new_file");
setAutoSaveSettings();
- QClipboard* clipboard = QApplication::clipboard();
- connect(clipboard, SIGNAL(dataChanged()),
- this, SLOT(updatePasteAction()));
+ TQClipboard* clipboard = TQApplication::tqclipboard();
+ connect(clipboard, TQT_SIGNAL(dataChanged()),
+ this, TQT_SLOT(updatePasteAction()));
updatePasteAction();
updateGoActions();
@@ -1177,173 +1177,173 @@ void Dolphin::setupActions()
{
// setup 'File' menu
KAction* createFolder = new KAction(i18n("Folder..."), "Ctrl+N",
- this, SLOT(createFolder()),
+ TQT_TQOBJECT(this), TQT_SLOT(createFolder()),
actionCollection(), "create_folder");
createFolder->setIcon("folder");
new KAction(i18n("Rename"), KKey(Key_F2),
- this, SLOT(rename()),
+ TQT_TQOBJECT(this), TQT_SLOT(rename()),
actionCollection(), "rename");
KAction* moveToTrashAction = new KAction(i18n("Move to Trash"), KKey(Key_Delete),
- this, SLOT(moveToTrash()),
+ TQT_TQOBJECT(this), TQT_SLOT(moveToTrash()),
actionCollection(), "move_to_trash");
moveToTrashAction->setIcon("edittrash");
KAction* deleteAction = new KAction(i18n("Delete"), "Shift+Delete",
- this, SLOT(deleteItems()),
+ TQT_TQOBJECT(this), TQT_SLOT(deleteItems()),
actionCollection(), "delete");
deleteAction->setIcon("editdelete");
new KAction(i18n("Propert&ies"), "Alt+Return",
- this, SLOT(properties()),
+ TQT_TQOBJECT(this), TQT_SLOT(properties()),
actionCollection(), "properties");
- KStdAction::quit(this, SLOT(quit()), actionCollection());
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quit()), actionCollection());
// setup 'Edit' menu
UndoManager& undoManager = UndoManager::instance();
KStdAction::undo(&undoManager,
- SLOT(undo()),
+ TQT_SLOT(undo()),
actionCollection());
- connect(&undoManager, SIGNAL(undoAvailable(bool)),
- this, SLOT(slotUndoAvailable(bool)));
- connect(&undoManager, SIGNAL(undoTextChanged(const QString&)),
- this, SLOT(slotUndoTextChanged(const QString&)));
+ connect(&undoManager, TQT_SIGNAL(undoAvailable(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotUndoAvailable(bool)));
+ connect(&undoManager, TQT_SIGNAL(undoTextChanged(const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotUndoTextChanged(const TQString&)));
KStdAction::redo(&undoManager,
- SLOT(redo()),
+ TQT_SLOT(redo()),
actionCollection());
- connect(&undoManager, SIGNAL(redoAvailable(bool)),
- this, SLOT(slotRedoAvailable(bool)));
- connect(&undoManager, SIGNAL(redoTextChanged(const QString&)),
- this, SLOT(slotRedoTextChanged(const QString&)));
+ connect(&undoManager, TQT_SIGNAL(redoAvailable(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotRedoAvailable(bool)));
+ connect(&undoManager, TQT_SIGNAL(redoTextChanged(const TQString&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotRedoTextChanged(const TQString&)));
- KStdAction::cut(this, SLOT(cut()), actionCollection());
- KStdAction::copy(this, SLOT(copy()), actionCollection());
- KStdAction::paste(this, SLOT(paste()), actionCollection());
+ KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(cut()), actionCollection());
+ KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection());
+ KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection());
new KAction(i18n("Select All"), "Ctrl+A",
- this, SLOT(selectAll()),
+ TQT_TQOBJECT(this), TQT_SLOT(selectAll()),
actionCollection(), "select_all");
new KAction(i18n("Invert Selection"), "Ctrl+Shift+A",
- this, SLOT(invertSelection()),
+ TQT_TQOBJECT(this), TQT_SLOT(invertSelection()),
actionCollection(), "invert_selection");
// setup 'View' menu
- KStdAction::zoomIn(this,
- SLOT(zoomIn()),
+ KStdAction::zoomIn(TQT_TQOBJECT(this),
+ TQT_SLOT(zoomIn()),
actionCollection());
- KStdAction::zoomOut(this,
- SLOT(zoomOut()),
+ KStdAction::zoomOut(TQT_TQOBJECT(this),
+ TQT_SLOT(zoomOut()),
actionCollection());
KRadioAction* iconsView = new KRadioAction(i18n("Icons"), "Ctrl+1",
- this, SLOT(setIconsView()),
+ TQT_TQOBJECT(this), TQT_SLOT(setIconsView()),
actionCollection(), "icons");
iconsView->setExclusiveGroup("view_mode");
iconsView->setIcon("view_icon");
KRadioAction* detailsView = new KRadioAction(i18n("Details"), "Ctrl+2",
- this, SLOT(setDetailsView()),
+ TQT_TQOBJECT(this), TQT_SLOT(setDetailsView()),
actionCollection(), "details");
detailsView->setExclusiveGroup("view_mode");
detailsView->setIcon("view_text");
KRadioAction* previewsView = new KRadioAction(i18n("Previews"), "Ctrl+3",
- this, SLOT(setPreviewsView()),
+ TQT_TQOBJECT(this), TQT_SLOT(setPreviewsView()),
actionCollection(), "previews");
previewsView->setExclusiveGroup("view_mode");
previewsView->setIcon("gvdirpart");
KRadioAction* sortByName = new KRadioAction(i18n("By Name"), 0,
- this, SLOT(sortByName()),
+ TQT_TQOBJECT(this), TQT_SLOT(sortByName()),
actionCollection(), "by_name");
sortByName->setExclusiveGroup("sort");
KRadioAction* sortBySize = new KRadioAction(i18n("By Size"), 0,
- this, SLOT(sortBySize()),
+ TQT_TQOBJECT(this), TQT_SLOT(sortBySize()),
actionCollection(), "by_size");
sortBySize->setExclusiveGroup("sort");
KRadioAction* sortByDate = new KRadioAction(i18n("By Date"), 0,
- this, SLOT(sortByDate()),
+ TQT_TQOBJECT(this), TQT_SLOT(sortByDate()),
actionCollection(), "by_date");
sortByDate->setExclusiveGroup("sort");
- new KToggleAction(i18n("Descending"), 0, this, SLOT(toggleSortOrder()),
+ new KToggleAction(i18n("Descending"), 0, TQT_TQOBJECT(this), TQT_SLOT(toggleSortOrder()),
actionCollection(), "descending");
new KToggleAction(i18n("Show Hidden Files"), "Alt+.",
- this, SLOT(showHiddenFiles()),
+ TQT_TQOBJECT(this), TQT_SLOT(showHiddenFiles()),
actionCollection(), "show_hidden_files");
KToggleAction* splitAction = new KToggleAction(i18n("Split View"), "F10",
- this, SLOT(toggleSplitView()),
+ TQT_TQOBJECT(this), TQT_SLOT(toggleSplitView()),
actionCollection(), "split_view");
splitAction->setIcon("view_left_right");
KAction* reloadAction = new KAction(i18n("Reload"), "F5",
- this, SLOT(reloadView()),
+ TQT_TQOBJECT(this), TQT_SLOT(reloadView()),
actionCollection(), "reload");
reloadAction->setIcon("reload");
KAction* stopAction = new KAction(i18n("Stop"), 0,
- this, SLOT(stopLoading()),
+ TQT_TQOBJECT(this), TQT_SLOT(stopLoading()),
actionCollection(), "stop");
stopAction->setIcon("stop");
new KAction(i18n("Edit Location"), "Ctrl+L",
- this, SLOT(editLocation()),
+ TQT_TQOBJECT(this), TQT_SLOT(editLocation()),
actionCollection(), "edit_location");
new KAction(i18n("Browse"), "Ctrl+B",
- this, SLOT(browse()),
+ TQT_TQOBJECT(this), TQT_SLOT(browse()),
actionCollection(), "browse");
new KToggleAction(i18n("Left Sidebar"), "F8",
- this, SLOT(toggleleftSidebar()),
+ TQT_TQOBJECT(this), TQT_SLOT(toggleleftSidebar()),
actionCollection(), "leftsidebar");
new KToggleAction(i18n("Right Sidebar"), "F9",
- this, SLOT(togglerightSidebar()),
+ TQT_TQOBJECT(this), TQT_SLOT(togglerightSidebar()),
actionCollection(), "rightsidebar");
new KAction(i18n("Adjust View Properties..."), 0,
- this, SLOT(adjustViewProperties()),
+ TQT_TQOBJECT(this), TQT_SLOT(adjustViewProperties()),
actionCollection(), "view_properties");
// setup 'Go' menu
- KStdAction::back(this, SLOT(goBack()), actionCollection());
- KStdAction::forward(this, SLOT(goForward()), actionCollection());
- KStdAction::up(this, SLOT(goUp()), actionCollection());
- KStdAction::home(this, SLOT(goHome()), actionCollection());
+ KStdAction::back(TQT_TQOBJECT(this), TQT_SLOT(goBack()), actionCollection());
+ KStdAction::forward(TQT_TQOBJECT(this), TQT_SLOT(goForward()), actionCollection());
+ KStdAction::up(TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection());
+ KStdAction::home(TQT_TQOBJECT(this), TQT_SLOT(goHome()), actionCollection());
// setup 'Tools' menu
KAction* openTerminalAction = new KAction(i18n("Open Terminal"), "F4",
- this, SLOT(openTerminal()),
+ TQT_TQOBJECT(this), TQT_SLOT(openTerminal()),
actionCollection(), "open_terminal");
openTerminalAction->setIcon("konsole");
KAction* findFileAction = new KAction(i18n("Find File..."), "Ctrl+F",
- this, SLOT(findFile()),
+ TQT_TQOBJECT(this), TQT_SLOT(findFile()),
actionCollection(), "find_file");
- findFileAction->setIcon("filefind");
+ findFileAction->setIcon("filetqfind");
new KToggleAction(i18n("Show Filter Bar"), "filter", "/",
- this, SLOT(showFilterBar()),
+ TQT_TQOBJECT(this), TQT_SLOT(showFilterBar()),
actionCollection(), "show_filter_bar");
KAction* compareFilesAction = new KAction(i18n("Compare Files"), 0,
- this, SLOT(compareFiles()),
+ TQT_TQOBJECT(this), TQT_SLOT(compareFiles()),
actionCollection(), "compare_files");
compareFilesAction->setIcon("kompare");
compareFilesAction->setEnabled(false);
// setup 'Settings' menu
- KStdAction::preferences(this, SLOT(editSettings()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(editSettings()), actionCollection());
}
void Dolphin::setupCreateNewMenuActions()
@@ -1354,18 +1354,18 @@ void Dolphin::setupCreateNewMenuActions()
// Copyright (C) 1998, 1999 David Faure <faure@kde.org>
// 2003 Sven Leiber <s.leiber@web.de>
- QStringList files = actionCollection()->instance()->dirs()->findAllResources("templates");
- for (QStringList::Iterator it = files.begin() ; it != files.end(); ++it) {
+ TQStringList files = actionCollection()->instance()->dirs()->findAllResources("templates");
+ for (TQStringList::Iterator it = files.begin() ; it != files.end(); ++it) {
if ((*it)[0] != '.' ) {
KSimpleConfig config(*it, true);
config.setDesktopGroup();
// tricky solution to ensure that TextFile is at the beginning
// because this filetype is the most used (according kde-core discussion)
- const QString name(config.readEntry("Name"));
- QString key(name);
+ const TQString name(config.readEntry("Name"));
+ TQString key(name);
- const QString path(config.readPathEntry("URL"));
+ const TQString path(config.readPathEntry("URL"));
if (!path.endsWith("emptydir")) {
if (path.endsWith("TextFile.txt")) {
key = "1" + key;
@@ -1383,11 +1383,11 @@ void Dolphin::setupCreateNewMenuActions()
key = "5";
}
- const QString icon(config.readEntry("Icon"));
- const QString comment(config.readEntry("Comment"));
- const QString type(config.readEntry("Type"));
+ const TQString icon(config.readEntry("Icon"));
+ const TQString comment(config.readEntry("Comment"));
+ const TQString type(config.readEntry("Type"));
- const QString filePath(*it);
+ const TQString filePath(*it);
if (type == "Link") {
@@ -1404,17 +1404,17 @@ void Dolphin::setupCreateNewMenuActions()
m_createFileTemplates.sort();
unplugActionList("create_actions");
- KSortableValueList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin();
- KSortableValueList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end();
+ KSortableValueList<CreateFileEntry, TQString>::ConstIterator it = m_createFileTemplates.begin();
+ KSortableValueList<CreateFileEntry, TQString>::ConstIterator end = m_createFileTemplates.end();
while (it != end) {
CreateFileEntry entry = (*it).value();
KAction* action = new KAction(entry.name);
action->setIcon(entry.icon);
action->setName((*it).index().ascii());
- connect(action, SIGNAL(activated()),
- this, SLOT(createFile()));
+ connect(action, TQT_SIGNAL(activated()),
+ this, TQT_SLOT(createFile()));
- const QChar section = ((*it).index()[0]);
+ const TQChar section = ((*it).index()[0]);
switch (section) {
case '1':
case '2': {
@@ -1450,7 +1450,7 @@ void Dolphin::setupCreateNewMenuActions()
void Dolphin::updateHistory()
{
int index = 0;
- const QValueList<URLNavigator::HistoryElem> list = m_activeView->urlHistory(index);
+ const TQValueList<URLNavigator::HistoryElem> list = m_activeView->urlHistory(index);
KAction* backAction = actionCollection()->action("go_back");
if (backAction != 0) {
@@ -1567,7 +1567,7 @@ void Dolphin::updateViewProperties(const KURL::List& urls)
// use case is not worth the effort, but at least the main widget
// must be disabled and a progress should be shown.
ProgressIndicator progressIndicator(i18n("Updating view properties..."),
- QString::null,
+ TQString(),
urls.count());
KURL::List::ConstIterator end = urls.end();
@@ -1596,8 +1596,8 @@ void Dolphin::addPendingUndoJob(KIO::Job* job,
const KURL::List& source,
const KURL& dest)
{
- connect(job, SIGNAL(result(KIO::Job*)),
- this, SLOT(addUndoOperation(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(addUndoOperation(KIO::Job*)));
UndoInfo undoInfo;
undoInfo.id = job->progressId();
@@ -1620,10 +1620,10 @@ void Dolphin::openleftSidebar()
m_leftsidebar = new leftSidebar(m_splitter);
m_leftsidebar->show();
- connect(m_leftsidebar, SIGNAL(urlChanged(const KURL&)),
- this, SLOT(slotURLChangeRequest(const KURL&)));
+ connect(m_leftsidebar, TQT_SIGNAL(urlChanged(const KURL&)),
+ this, TQT_SLOT(slotURLChangeRequest(const KURL&)));
m_splitter->setCollapsible(m_leftsidebar, false);
- m_splitter->setResizeMode(m_leftsidebar, QSplitter::KeepSize);
+ m_splitter->setResizeMode(m_leftsidebar, TQSplitter::KeepSize);
m_splitter->moveToFirst(m_leftsidebar);
leftSidebarSettings* settings = DolphinSettings::instance().leftsidebar();
@@ -1640,10 +1640,10 @@ void Dolphin::openrightSidebar()
m_rightsidebar = new rightSidebar(m_splitter);
m_rightsidebar->show();
- connect(m_rightsidebar, SIGNAL(urlChanged(const KURL&)),
- this, SLOT(slotURLChangeRequest(const KURL&)));
+ connect(m_rightsidebar, TQT_SIGNAL(urlChanged(const KURL&)),
+ this, TQT_SLOT(slotURLChangeRequest(const KURL&)));
m_splitter->setCollapsible(m_rightsidebar, false);
- m_splitter->setResizeMode(m_rightsidebar, QSplitter::KeepSize);
+ m_splitter->setResizeMode(m_rightsidebar, TQSplitter::KeepSize);
m_splitter->moveToLast(m_rightsidebar);
rightSidebarSettings* settings = DolphinSettings::instance().rightsidebar();