Remove additional unneeded tq method conversions

(cherry picked from commit b651b3b01b)
v3.5.13-sru
Timothy Pearson 13 years ago committed by Slávek Banko
parent 3aca3483bf
commit 94cd9cadf1

@ -395,7 +395,7 @@ void Dolphin::createFolder()
// TODO: provide message type hint
if (ok) {
statusBar->setMessage(i18n("Created folder %1.").tqarg(url.path()),
statusBar->setMessage(i18n("Created folder %1.").arg(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.").tqarg(url.path()),
statusBar->setMessage(i18n("A folder named %1 already exists.").arg(url.path()),
DolphinStatusBar::Error);
}
else {
statusBar->setMessage(i18n("Creating of folder %1 failed.").tqarg(url.path()),
statusBar->setMessage(i18n("Creating of folder %1 failed.").arg(url.path()),
DolphinStatusBar::Error);
}
@ -490,7 +490,7 @@ void Dolphin::createFile()
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.").tqarg(name),
statusBar->setMessage(i18n("A file named %1 already exists.").arg(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.").tqarg(name),
statusBar->setMessage(i18n("Created file %1.").arg(name),
DolphinStatusBar::OperationCompleted);
KURL::List list;
@ -510,7 +510,7 @@ void Dolphin::createFile()
}
else {
statusBar->setMessage(i18n("Creating of file %1 failed.").tqarg(name),
statusBar->setMessage(i18n("Creating of file %1 failed.").arg(name),
DolphinStatusBar::Error);
}
}
@ -539,11 +539,11 @@ void Dolphin::deleteItems()
TQString text;
if (itemCount > 1) {
text = i18n("Do you really want to delete the %1 selected items?").tqarg(itemCount);
text = i18n("Do you really want to delete the %1 selected items?").arg(itemCount);
}
else {
const KURL& url = list.first();
text = i18n("Do you really want to delete '%1'?").tqarg(url.fileName());
text = i18n("Do you really want to delete '%1'?").arg(url.fileName());
}
const bool del = KMessageBox::warningContinueCancel(this,
@ -715,7 +715,7 @@ void Dolphin::updatePasteAction()
pasteAction->setText(i18n("Paste 1 File"));
}
else {
pasteAction->setText(i18n("Paste %1 Files").tqarg(count));
pasteAction->setText(i18n("Paste %1 Files").arg(count));
}
}
else {

@ -489,7 +489,7 @@ void DolphinDetailsView::slotActivationUpdate()
update();
// TODO: there must be a simpler way to say
// "update all tqchildren"
// "update all children"
const TQObjectList list = childrenListObject();
if (list.isEmpty()) {
return;
@ -713,7 +713,7 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
const TQColorGroup& colorGroup,
int column,
int cellWidth,
int tqalignment)
int alignment)
{
const TQListView* view = listView();
const bool isActive = TQT_BASE_OBJECT(view->parent()) == TQT_BASE_OBJECT(Dolphin::mainWin().activeView());
@ -725,26 +725,26 @@ void DolphinDetailsView::DolphinListViewItem::paintCell(TQPainter* painter,
const TQColor highlightColor(isActive ? backgroundColor(column) : view->colorGroup().background());
defaultColorGroup.setColor(TQColorGroup::Highlight , highlightColor);
defaultColorGroup.setColor(TQColorGroup::HighlightedText, colorGroup.color(TQColorGroup::Text));
KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, tqalignment);
KFileListViewItem::paintCell(painter, defaultColorGroup, column, cellWidth, alignment);
if (column == 0) {
// draw the selection only on the first column
TQListView* parent = listView();
const int itemWidth = width(parent->fontMetrics(), parent, 0);
if (isActive) {
KFileListViewItem::paintCell(painter, colorGroup, column, itemWidth, tqalignment);
KFileListViewItem::paintCell(painter, colorGroup, column, itemWidth, alignment);
}
else {
TQListViewItem::paintCell(painter, colorGroup, column, itemWidth, tqalignment);
TQListViewItem::paintCell(painter, colorGroup, column, itemWidth, alignment);
}
}
}
else {
if (isActive) {
KFileListViewItem::paintCell(painter, colorGroup, column, cellWidth, tqalignment);
KFileListViewItem::paintCell(painter, colorGroup, column, cellWidth, alignment);
}
else {
TQListViewItem::paintCell(painter, colorGroup, column, cellWidth, tqalignment);
TQListViewItem::paintCell(painter, colorGroup, column, cellWidth, alignment);
}
}

@ -193,7 +193,7 @@ private:
const TQColorGroup& colorGroup,
int column,
int cellWidth,
int tqalignment);
int alignment);
virtual void paintFocus(TQPainter* painter,
const TQColorGroup& colorGroup,

@ -447,7 +447,7 @@ void DolphinIconsView::slotActivationUpdate()
update();
// TODO: there must be a simpler way to say
// "update all tqchildren"
// "update all children"
const TQObjectList list = childrenListObject();
if (list.isEmpty()) {
return;

@ -248,7 +248,7 @@ void DolphinView::renameSelectedItems()
if (destExists) {
delete progressIndicator;
progressIndicator = 0;
view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").tqarg(name),
view->statusBar()->setMessage(i18n("Renaming failed (item '%1' already exists).").arg(name),
DolphinStatusBar::Error);
break;
}
@ -575,14 +575,14 @@ void DolphinView::rename(const KURL& source, const TQString& newName)
}
if (ok) {
m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").tqarg(source.fileName(), dest.fileName()),
m_statusBar->setMessage(i18n("Renamed file '%1' to '%2'.").arg(source.fileName(), dest.fileName()),
DolphinStatusBar::OperationCompleted);
DolphinCommand command(DolphinCommand::Rename, source, dest);
UndoManager::instance().addCommand(command);
}
else {
m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").tqarg(source.fileName(), dest.fileName()),
m_statusBar->setMessage(i18n("Renaming of file '%1' to '%2' failed.").arg(source.fileName(), dest.fileName()),
DolphinStatusBar::Error);
reload();
}
@ -930,7 +930,7 @@ void DolphinView::startDirLister(const KURL& url, bool reload)
m_statusBar->setMessage(i18n("The location is empty."), DolphinStatusBar::Error);
}
else {
m_statusBar->setMessage(i18n("The location '%1' is invalid.").tqarg(location),
m_statusBar->setMessage(i18n("The location '%1' is invalid.").arg(location),
DolphinStatusBar::Error);
}
return;
@ -993,7 +993,7 @@ TQString DolphinView::selectionStatusBarText() const
if (fileCount > 0) {
const TQString sizeText(KIO::convertSize(byteSize));
text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).tqarg(sizeText);
text += i18n("1 File selected (%1)", "%n Files selected (%1)", fileCount).arg(sizeText);
}
return text;

@ -74,7 +74,7 @@ InfoSidebarPage::InfoSidebarPage(TQWidget* parent) :
// name
m_name = new TQLabel(this);
m_name->setTextFormat(TQt::RichText);
m_name->setAlignment(m_name->tqalignment() | TQt::AlignHCenter);
m_name->setAlignment(m_name->alignment() | TQt::AlignHCenter);
TQFontMetrics fontMetrics(m_name->font());
m_name->setMinimumHeight(fontMetrics.height() * 3);
m_name->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Maximum);
@ -406,7 +406,7 @@ void InfoSidebarPage::addInfoLine(const TQString& labelText, const TQString& inf
void InfoSidebarPage::insertActions()
{
// delete all existing action widgets
// TODO: just use tqchildren() from TQObject...
// TODO: just use children() from TQObject...
TQPtrListIterator<TQWidget> deleteIter(m_actionWidgets);
TQWidget* widget = 0;
while ((widget = deleteIter.current()) != 0) {

@ -155,10 +155,10 @@ private:
int m_currInfoLineIdx;
TQGrid* m_infoGrid;
TQPtrList<TQLabel> m_infoWidgets; // TODO: use tqchildren() from TQObject instead
TQPtrList<TQLabel> m_infoWidgets; // TODO: use children() from TQObject instead
TQVBox* m_actionBox;
TQPtrList<TQWidget> m_actionWidgets; // TODO: use tqchildren() from TQObject instead
TQPtrList<TQWidget> m_actionWidgets; // TODO: use children() from TQObject instead
TQValueVector<KDEDesktopMimeType::Service> m_actionsVector;
};

@ -182,7 +182,7 @@ TQString ItemEffectsManager::statusBarText(KFileItem* fileInfo) const
// KFileItem::getStatusBar() returns "MyDocuments/ Folder" as
// status bar text for a folder 'MyDocuments'. This is adjusted
// to "MyDocuments (Folder)" in Dolphin.
return i18n("%1 (Folder)").tqarg(fileInfo->name());
return i18n("%1 (Folder)").arg(fileInfo->name());
}
return fileInfo->getStatusBarInfo();

@ -72,7 +72,7 @@ void ProgressIndicator::execOperation()
DolphinStatusBar* statusBar = Dolphin::mainWin().activeView()->statusBar();
statusBar->setProgress((m_operationsIndex * 100) / m_operationsCount);
kapp->processEvents();
statusBar->tqrepaint();
statusBar->repaint();
}
}
}

@ -90,7 +90,7 @@ void StatusBarSpaceInfo::paintEvent(TQPaintEvent* /* event */)
painter.drawRect(TQRect(left, barTop + 2, right, barHeight - 2));
text = i18n("%1 free")
.tqarg(KIO::convertSizeFromKB(m_kBAvailable));
.arg(KIO::convertSizeFromKB(m_kBAvailable));
}
else {
if (m_gettingSize) {

@ -84,7 +84,7 @@ void UndoManager::addCommand(const DolphinCommand& command)
}
emit undoAvailable(true);
emit undoTextChanged(i18n("Undo: %1").tqarg(commandText(command)));
emit undoTextChanged(i18n("Undo: %1").arg(commandText(command)));
// prevent an endless growing of the Undo history
if (m_historyIndex > 10000) {
@ -132,12 +132,12 @@ void UndoManager::undo()
emit undoTextChanged(i18n("Undo"));
}
else {
emit undoTextChanged(i18n("Undo: %1").tqarg(commandText(m_history[m_historyIndex])));
emit undoTextChanged(i18n("Undo: %1").arg(commandText(m_history[m_historyIndex])));
}
if (m_historyIndex < static_cast<int>(m_history.count()) - 1) {
emit redoAvailable(true);
emit redoTextChanged(i18n("Redo: %1").tqarg(commandText(command)));
emit redoTextChanged(i18n("Redo: %1").arg(commandText(command)));
}
else {
emit redoAvailable(false);
@ -244,11 +244,11 @@ void UndoManager::redo()
emit redoTextChanged(i18n("Redo"));
}
else {
emit redoTextChanged(i18n("Redo: %1").tqarg(commandText(m_history[m_historyIndex + 1])));
emit redoTextChanged(i18n("Redo: %1").arg(commandText(m_history[m_historyIndex + 1])));
}
emit undoAvailable(true);
emit undoTextChanged(i18n("Undo: %1").tqarg(commandText(command)));
emit undoTextChanged(i18n("Undo: %1").arg(commandText(command)));
Dolphin& dolphin = Dolphin::mainWin();

@ -331,7 +331,7 @@ void URLNavigatorButton::listJobFinished(KIO::Job* job)
++it;
}
int result = dirsMenu->exec(urlNavigator()->mapToGlobal(tqgeometry().bottomLeft()));
int result = dirsMenu->exec(urlNavigator()->mapToGlobal(geometry().bottomLeft()));
if (result >= 0) {
KURL url = urlNavigator()->url(m_index);

Loading…
Cancel
Save