DolphinMainWindow::DolphinMainWindow() :
- KMainWindow(0, "Dolphin"),
+ KMainWindow(0),
m_splitter(0),
m_activeView(0),
m_clipboardContainsCutData(false)
{
+ setObjectName("Dolphin");
m_view[PrimaryIdx] = 0;
m_view[SecondaryIdx] = 0;
KSortableList<CreateFileEntry, QString>::ConstIterator it = m_createFileTemplates.begin();
KSortableList<CreateFileEntry, QString>::ConstIterator end = m_createFileTemplates.end();
- const QString senderName(sender()->name());
+ const QString senderName(sender()->objectName());
bool found = false;
CreateFileEntry entry;
while (!found && (it != end)) {
QString sourcePath(entry.templatePath.left(pos + 1));
sourcePath += KDesktopFile(entry.templatePath, true).readPathEntry("Url");
- QString name(i18n(entry.name.ascii()));
+ QString name(i18n(entry.name.toAscii()));
// 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);
void DolphinMainWindow::properties()
{
- const KFileItemList* sourceList = m_activeView->selectedItems();
- if (sourceList == 0) {
- return;
- }
-
- KFileItemList list;
- KFileItemList::const_iterator it = sourceList->begin();
- const KFileItemList::const_iterator end = sourceList->end();
- KFileItem* item = 0;
- while (it != end) {
- list.append(item);
- ++it;
- }
-
+ const KFileItemList list = m_activeView->selectedItems();
new KPropertiesDialog(list, this);
}
void DolphinMainWindow::updateEditActions()
{
- const KFileItemList* list = m_activeView->selectedItems();
- if ((list == 0) || (*list).isEmpty()) {
+ const KFileItemList list = m_activeView->selectedItems();
+ if (list.isEmpty()) {
stateChanged("has_no_selection");
}
else {
KAction* renameAction = actionCollection()->action("rename");
if (renameAction != 0) {
- renameAction->setEnabled(list->count() >= 1);
+ renameAction->setEnabled(list.count() >= 1);
}
bool enableMoveToTrash = true;
- KFileItemList::const_iterator it = list->begin();
- const KFileItemList::const_iterator end = list->end();
+ KFileItemList::const_iterator it = list.begin();
+ const KFileItemList::const_iterator end = list.end();
while (it != end) {
KFileItem* item = *it;
const KUrl& url = item->url();