svn path=/trunk/playground/utils/dolphin/; revision=612307
#include <kbookmark.h>
#include <urlbutton.h>
#include <kbookmark.h>
#include <urlbutton.h>
-//Added by qt3to4:
-#include <Q3PopupMenu>
class UrlNavigator;
class Q3PopupMenu;
class UrlNavigator;
class Q3PopupMenu;
{
config->setGroup("Primary view");
m_view[PrimaryIdx]->setUrl(config->readEntry("Url"));
{
config->setGroup("Primary view");
m_view[PrimaryIdx]->setUrl(config->readEntry("Url"));
- m_view[PrimaryIdx]->setUrlEditable(config->readBoolEntry("Editable Url"));
+ m_view[PrimaryIdx]->setUrlEditable(config->readEntry("Editable Url", false));
if (config->hasGroup("Secondary view")) {
config->setGroup("Secondary view");
if (m_view[SecondaryIdx] == 0) {
toggleSplitView();
}
m_view[SecondaryIdx]->setUrl(config->readEntry("Url"));
if (config->hasGroup("Secondary view")) {
config->setGroup("Secondary view");
if (m_view[SecondaryIdx] == 0) {
toggleSplitView();
}
m_view[SecondaryIdx]->setUrl(config->readEntry("Url"));
- m_view[SecondaryIdx]->setUrlEditable(config->readBoolEntry("Editable Url"));
+ m_view[SecondaryIdx]->setUrlEditable(config->readEntry("Editable Url", false));
}
else if (m_view[SecondaryIdx] != 0) {
toggleSplitView();
}
else if (m_view[SecondaryIdx] != 0) {
toggleSplitView();
bool found = false;
CreateFileEntry entry;
while (!found && (it != end)) {
bool found = false;
CreateFileEntry entry;
while (!found && (it != end)) {
- if ((*it).index() == senderName) {
+ if ((*it).key() == senderName) {
entry = (*it).value();
found = true;
}
entry = (*it).value();
found = true;
}
// Get the source path of the template which should be copied.
// The source path is part of the Url entry of the desktop file.
// 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('/');
+ const int pos = entry.templatePath.lastIndexOf('/');
QString sourcePath(entry.templatePath.left(pos + 1));
sourcePath += KDesktopFile(entry.templatePath, true).readPathEntry("Url");
QString sourcePath(entry.templatePath.left(pos + 1));
sourcePath += KDesktopFile(entry.templatePath, true).readPathEntry("Url");
name.replace("...", QString::null);
// add the file extension to the name
name.replace("...", QString::null);
// add the file extension to the name
- name.append(sourcePath.right(sourcePath.length() - sourcePath.findRev('.')));
+ name.append(sourcePath.right(sourcePath.length() - sourcePath.lastIndexOf('.')));
// 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").
// 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").
QString text(i18n("Paste"));
QClipboard* clipboard = QApplication::clipboard();
QString text(i18n("Paste"));
QClipboard* clipboard = QApplication::clipboard();
- QMimeSource* data = clipboard->data();
+ const QMimeData* data = clipboard->mimeData();
/* KDE4-TODO:
if (KUrlDrag::canDecode(data)) {
pasteAction->setEnabled(true);
/* KDE4-TODO:
if (KUrlDrag::canDecode(data)) {
pasteAction->setEnabled(true);
while (sourceIt != sourceEnd) {
QMap<QString, QString>::ConstIterator metaIt = metaData.find("trashUrl-" + (*sourceIt).path());
if (metaIt != metaData.end()) {
while (sourceIt != sourceEnd) {
QMap<QString, QString>::ConstIterator metaIt = metaData.find("trashUrl-" + (*sourceIt).path());
if (metaIt != metaData.end()) {
- newSourceUrls.append(KUrl(metaIt.data()));
+ newSourceUrls.append(KUrl(metaIt.value()));
KSimpleConfig cfg(*dirIt + *entryIt, true);
cfg.setDesktopGroup();
if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) {
KSimpleConfig cfg(*dirIt + *entryIt, true);
cfg.setDesktopGroup();
if ((cfg.hasKey("Actions") || cfg.hasKey("X-KDE-GetActionMenu")) && cfg.hasKey("ServiceTypes")) {
- const QStringList types = cfg.readListEntry("ServiceTypes");
+ const QStringList types = cfg.readListEntry("ServiceTypes", ',');
for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) {
// check whether the mime type is equal or whether the
// mimegroup (e. g. image/*) is supported
for (QStringList::ConstIterator it = types.begin(); it != types.end(); ++it) {
// check whether the mime type is equal or whether the
// mimegroup (e. g. image/*) is supported
QPushButton* button = new QPushButton(submenuName, m_actionBox);
button->setFlat(true);
QPushButton* button = new QPushButton(submenuName, m_actionBox);
button->setFlat(true);
- button->setPopup(popup);
+ button->setMenu(popup);
button->show();
m_actionWidgets.append(button);
}
button->show();
m_actionWidgets.append(button);
}
//menu->insertItems(m_protocols);
connect(menu, SIGNAL(activated(int)), this, SLOT(setProtocol(int)));
setText(protocol);
//menu->insertItems(m_protocols);
connect(menu, SIGNAL(activated(int)), this, SLOT(setProtocol(int)));
setText(protocol);
setDisplayHintEnabled(PopupActiveHint, true);
update(); // ensure the button is drawn highlighted
Q3PopupMenu* dirsMenu = new Q3PopupMenu(this);
setDisplayHintEnabled(PopupActiveHint, true);
update(); // ensure the button is drawn highlighted
Q3PopupMenu* dirsMenu = new Q3PopupMenu(this);
QStringList::const_iterator it = m_subdirs.constBegin();
QStringList::const_iterator itEnd = m_subdirs.constEnd();
int i = 0;
QStringList::const_iterator it = m_subdirs.constBegin();
QStringList::const_iterator itEnd = m_subdirs.constEnd();
int i = 0;