Commit f5f72f01 authored by Scott Wheeler's avatar Scott Wheeler

Fix a couple more classes, s/KURL/KUrl/g

svn path=/trunk/KDE/kdemultimedia/juk/; revision=513976
parent ca428d98
......@@ -16,6 +16,7 @@
#ifndef HISTORYPLAYLIST_H
#define HISTORYPLAYLIST_H
#include <QDateTime>
#include "playlist.h"
#include "playlistitem.h"
......
......@@ -36,7 +36,7 @@
#include "collectionlist.h"
#include "covermanager.h"
#include "tagtransactionmanager.h"
//Added by qt3to4:
#include <QKeyEvent>
using namespace ActionCollection;
......@@ -114,52 +114,52 @@ void JuK::setupActions()
{
ActionCollection::actions()->setWidget(this);
KStdAction::quit(this, SLOT(slotQuit()), actions());
KStdAction::undo(this, SLOT(slotUndo()), actions());
KStdAction::cut(kapp, SLOT(cut()), actions());
KStdAction::copy(kapp, SLOT(copy()), actions());
KStdAction::paste(kapp, SLOT(paste()), actions());
KStdAction::clear(kapp, SLOT(clear()), actions());
KStdAction::selectAll(kapp, SLOT(selectAll()), actions());
KStdAction::quit(this, SLOT(slotQuit()), ActionCollection::actions());
KStdAction::undo(this, SLOT(slotUndo()), ActionCollection::actions());
KStdAction::cut(kapp, SLOT(cut()), ActionCollection::actions());
KStdAction::copy(kapp, SLOT(copy()), ActionCollection::actions());
KStdAction::paste(kapp, SLOT(paste()), ActionCollection::actions());
KStdAction::clear(kapp, SLOT(clear()), ActionCollection::actions());
KStdAction::selectAll(kapp, SLOT(selectAll()), ActionCollection::actions());
new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, SLOT(clear()), actions(), "removeFromPlaylist");
new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, SLOT(clear()), ActionCollection::actions(), "removeFromPlaylist");
KActionMenu *actionMenu = new KActionMenu(i18n("&Random Play"), "roll", actions(), "actionMenu");
KActionMenu *actionMenu = new KActionMenu(i18n("&Random Play"), "roll", ActionCollection::actions(), "actionMenu");
actionMenu->setDelayed(false);
KRadioAction *ka = new KRadioAction(i18n("&Disable Random Play"), "player_playlist", 0, actions(), "disableRandomPlay");
KRadioAction *ka = new KRadioAction(i18n("&Disable Random Play"), "player_playlist", 0, ActionCollection::actions(), "disableRandomPlay");
ka->setExclusiveGroup("randomPlayGroup");
actionMenu->insert(ka);
m_randomPlayAction = new KRadioAction(i18n("Use &Random Play"), "roll", 0, actions(), "randomPlay");
m_randomPlayAction = new KRadioAction(i18n("Use &Random Play"), "roll", 0, ActionCollection::actions(), "randomPlay");
m_randomPlayAction->setExclusiveGroup("randomPlayGroup");
actionMenu->insert(m_randomPlayAction);
ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, actions(), "albumRandomPlay");
ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, ActionCollection::actions(), "albumRandomPlay");
ka->setExclusiveGroup("randomPlayGroup");
connect(ka, SIGNAL(toggled(bool)), SLOT(slotCheckAlbumNextAction(bool)));
actionMenu->insert(ka);
new KAction(i18n("&Play"), "player_play", 0, m_player, SLOT(play()), actions(), "play");
new KAction(i18n("P&ause"), "player_pause", 0, m_player, SLOT(pause()), actions(), "pause");
new KAction(i18n("&Stop"), "player_stop", 0, m_player, SLOT(stop()), actions(), "stop");
new KAction(i18n("&Play"), "player_play", 0, m_player, SLOT(play()), ActionCollection::actions(), "play");
new KAction(i18n("P&ause"), "player_pause", 0, m_player, SLOT(pause()), ActionCollection::actions(), "pause");
new KAction(i18n("&Stop"), "player_stop", 0, m_player, SLOT(stop()), ActionCollection::actions(), "stop");
new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, SLOT(back()), actions(), "back");
new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, SLOT(forward()), actions(), "forward");
new KToggleAction(i18n("&Loop Playlist"), 0, KShortcut(), actions(), "loopPlaylist");
new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, SLOT(back()), ActionCollection::actions(), "back");
new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, SLOT(forward()), ActionCollection::actions(), "forward");
new KToggleAction(i18n("&Loop Playlist"), 0, KShortcut(), ActionCollection::actions(), "loopPlaylist");
KToggleAction *resizeColumnAction =
new KToggleAction(i18n("&Resize Playlist Columns Manually"),
KShortcut(), actions(), "resizeColumnsManually");
KShortcut(), ActionCollection::actions(), "resizeColumnsManually");
resizeColumnAction->setCheckedState(i18n("&Resize Column Headers Automatically"));
// the following are not visible by default
new KAction(i18n("Mute"), "mute", 0, m_player, SLOT(mute()), actions(), "mute");
new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, SLOT(volumeUp()), actions(), "volumeUp");
new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, SLOT(volumeDown()), actions(), "volumeDown");
new KAction(i18n("Play / Pause"), "playPause", 0, m_player, SLOT(playPause()), actions(), "playPause");
new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, SLOT(seekForward()), actions(), "seekForward");
new KAction(i18n("Seek Back"), "seekBack", 0, m_player, SLOT(seekBack()), actions(), "seekBack");
new KAction(i18n("Mute"), "mute", 0, m_player, SLOT(mute()), ActionCollection::actions(), "mute");
new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, SLOT(volumeUp()), ActionCollection::actions(), "volumeUp");
new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, SLOT(volumeDown()), ActionCollection::actions(), "volumeDown");
new KAction(i18n("Play / Pause"), "playPause", 0, m_player, SLOT(playPause()), ActionCollection::actions(), "playPause");
new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, SLOT(seekForward()), ActionCollection::actions(), "seekForward");
new KAction(i18n("Seek Back"), "seekBack", 0, m_player, SLOT(seekBack()), ActionCollection::actions(), "seekBack");
//////////////////////////////////////////////////
// settings menu
......@@ -167,42 +167,42 @@ void JuK::setupActions()
m_toggleSplashAction =
new KToggleAction(i18n("Show Splash Screen on Startup"),
KShortcut(), actions(), "showSplashScreen");
KShortcut(), ActionCollection::actions(), "showSplashScreen");
m_toggleSplashAction->setCheckedState(i18n("Hide Splash Screen on Startup"));
m_toggleSystemTrayAction =
new KToggleAction(i18n("&Dock in System Tray"),
KShortcut(), actions(), "toggleSystemTray");
KShortcut(), ActionCollection::actions(), "toggleSystemTray");
m_toggleDockOnCloseAction =
new KToggleAction(i18n("&Stay in System Tray on Close"),
KShortcut(), actions(), "dockOnClose");
KShortcut(), ActionCollection::actions(), "dockOnClose");
m_togglePopupsAction =
new KToggleAction(i18n("Popup &Track Announcement"),
KShortcut(), this, 0, actions(), "togglePopups");
KShortcut(), this, 0, ActionCollection::actions(), "togglePopups");
new KToggleAction(i18n("Save &Play Queue on Exit"),
KShortcut(), this, 0, actions(), "saveUpcomingTracks");
KShortcut(), this, 0, ActionCollection::actions(), "saveUpcomingTracks");
connect(m_toggleSystemTrayAction, SIGNAL(toggled(bool)),
this, SLOT(slotToggleSystemTray(bool)));
m_outputSelectAction = PlayerManager::playerSelectAction(actions());
m_outputSelectAction = PlayerManager::playerSelectAction(ActionCollection::actions());
if(m_outputSelectAction)
m_outputSelectAction->setCurrentItem(0);
new KAction(i18n("&Tag Guesser..."), 0, 0, this, SLOT(slotConfigureTagGuesser()),
actions(), "tagGuesserConfig");
ActionCollection::actions(), "tagGuesserConfig");
new KAction(i18n("&File Renamer..."), 0, 0, this, SLOT(slotConfigureFileRenamer()),
actions(), "fileRenamerConfig");
ActionCollection::actions(), "fileRenamerConfig");
KStdAction::keyBindings(this, SLOT(slotEditKeys()), actions());
KStdAction::keyBindings(this, SLOT(slotEditKeys()), ActionCollection::actions());
//////////////////////////////////////////////////
// just in the toolbar
//////////////////////////////////////////////////
m_sliderAction = new SliderAction(i18n("Track Position"), actions(),
m_sliderAction = new SliderAction(i18n("Track Position"), ActionCollection::actions(),
"trackPositionAction");
}
......@@ -260,11 +260,14 @@ void JuK::slotProcessArgs()
void JuK::createDirs()
{
QDir dir(KGlobal::dirs()->saveLocation("data", kapp->instanceName() + '/'));
if (!dir.exists("covers", false))
dir.mkdir("covers", false);
if(!dir.exists("covers"))
dir.mkdir("covers");
dir.cd("covers");
if (!dir.exists("large", false))
dir.mkdir("large", false);
if(!dir.exists("large"))
dir.mkdir("large");
}
void JuK::keyPressEvent(QKeyEvent *e)
......@@ -447,7 +450,7 @@ void JuK::slotToggleSystemTray(bool enabled)
void JuK::slotEditKeys()
{
KeyDialog::configure(m_accel, actions(), this);
KeyDialog::configure(m_accel, ActionCollection::actions(), this);
}
void JuK::slotConfigureTagGuesser()
......
......@@ -131,7 +131,7 @@ void K3bExporter::exportPlaylistItems(const PlaylistItemList &items)
return;
DCOPClient *client = DCOPClient::mainClient();
Q3CString appId, appObj;
DCOPCString appId, appObj;
QByteArray data;
if(!client->findObject("k3b-*", "K3bInterface", "", data, appId, appObj))
......@@ -192,17 +192,17 @@ void K3bExporter::exportViaDCOP(const PlaylistItemList &items, DCOPRef &ref)
if(projectList.count() == 0 && !startNewK3bProject(ref))
return;
KURL::List urlList;
KUrl::List urlList;
PlaylistItemList::ConstIterator it;
for(it = items.begin(); it != items.end(); ++it) {
KURL item;
KUrl item;
item.setPath((*it)->file().absFilePath());
urlList.append(item);
}
if(!ref.send("addUrls(KURL::List)", DCOPArg(urlList, "KURL::List"))) {
if(!ref.send("addUrls(KUrl::List)", DCOPArg(urlList, "KUrl::List"))) {
DCOPErrorMessage();
return;
}
......
......@@ -20,7 +20,7 @@
#include <kglobalaccel.h>
#include <kkeydialog.h>
#include <qhbuttongroup.h>
#include <qbuttongroup.h>
#include <q3widgetstack.h>
class KeyDialog : public KDialogBase
......@@ -75,8 +75,8 @@ private:
KActionCollection *m_actionCollection;
KGlobalAccel *m_keys;
KKeyChooser *m_pKeyChooser;
Q3HButtonGroup *m_group;
Q3WidgetStack *m_widgetStack;
QButtonGroup *m_group;
Q3WidgetStack *m_widgetStack;
static const KeyInfo keyInfo[];
static const uint keyInfoCount;
......
......@@ -178,7 +178,7 @@ protected:
useProxy = !useProxy;
if(useProxy) {
KURL proxy = KProtocolManager::proxyFor("http");
KUrl proxy = KProtocolManager::proxyFor("http");
QString proxyHost = proxy.host();
kDebug(65432) << "Using proxy server " << proxyHost << " for www.musicbrainz.org.\n";
......
......@@ -143,10 +143,10 @@ QStringList MediaFiles::mimeTypes()
QStringList MediaFiles::convertURLsToLocal(const QStringList &urlList, QWidget *w)
{
QStringList result;
KURL localUrl;
KUrl localUrl;
for(QStringList::ConstIterator it = urlList.constBegin(); it != urlList.constEnd(); ++it) {
localUrl = KIO::NetAccess::mostLocalURL(KURL::fromPathOrURL(*it), w);
localUrl = KIO::NetAccess::mostLocalURL(KUrl::fromPathOrURL(*it), w);
if(!localUrl.isLocalFile())
kDebug(65432) << localUrl << " is not a local file, skipping.\n";
......
......@@ -182,7 +182,7 @@ void CoverItem::mouseMoveEvent(QMouseEvent *e)
void CoverItem::dragEnterEvent(QDragEnterEvent *e)
{
e->accept(Q3ImageDrag::canDecode(e) || KURLDrag::canDecode(e) || CoverDrag::canDecode(e));
e->accept(Q3ImageDrag::canDecode(e) || KUrlDrag::canDecode(e) || CoverDrag::canDecode(e));
}
void CoverItem::dropEvent(QDropEvent *e)
......@@ -202,7 +202,7 @@ void CoverItem::dropEvent(QDropEvent *e)
m_file.coverInfo()->setCoverId(key);
update(m_file);
}
else if(KURLDrag::decode(e, urls)) {
else if(KUrlDrag::decode(e, urls)) {
QString fileName;
if(KIO::NetAccess::download(urls.front(), fileName, this)) {
......
......@@ -857,7 +857,7 @@ void Playlist::slotAddCover(bool retrieveLocal)
QPixmap newCover;
if(retrieveLocal) {
KURL file = KFileDialog::getImageOpenURL(
KUrl file = KFileDialog::getImageOpenURL(
":homedir", this, i18n("Select Cover Image File"));
newCover = QPixmap(file.directory() + "/" + file.fileName());
}
......@@ -1018,14 +1018,14 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
Q3DragObject *Playlist::dragObject(QWidget *parent)
{
PlaylistItemList items = selectedItems();
KURL::List urls;
KUrl::List urls;
for(PlaylistItemList::Iterator it = items.begin(); it != items.end(); ++it) {
KURL url;
KUrl url;
url.setPath((*it)->file().absFilePath());
urls.append(url);
}
KURLDrag *drag = new KURLDrag(urls, parent, "Playlist Items");
KUrlDrag *drag = new KUrlDrag(urls, parent, "Playlist Items");
drag->setPixmap(BarIcon("sound"));
return drag;
......@@ -1046,8 +1046,8 @@ void Playlist::contentsDragEnterEvent(QDragEnterEvent *e)
setDropHighlighter(false);
setDropVisualizer(true);
KURL::List urls;
if(!KURLDrag::decode(e, urls) || urls.isEmpty()) {
KUrl::List urls;
if(!KUrlDrag::decode(e, urls) || urls.isEmpty()) {
e->ignore();
return;
}
......@@ -1058,24 +1058,24 @@ void Playlist::contentsDragEnterEvent(QDragEnterEvent *e)
bool Playlist::acceptDrag(QDropEvent *e) const
{
return CoverDrag::canDecode(e) || KURLDrag::canDecode(e);
return CoverDrag::canDecode(e) || KUrlDrag::canDecode(e);
}
bool Playlist::canDecode(QMimeSource *s)
{
KURL::List urls;
KUrl::List urls;
if(CoverDrag::canDecode(s))
return true;
return KURLDrag::decode(s, urls) && !urls.isEmpty();
return KUrlDrag::decode(s, urls) && !urls.isEmpty();
}
void Playlist::decode(QMimeSource *s, PlaylistItem *item)
{
KURL::List urls;
KUrl::List urls;
if(!KURLDrag::decode(s, urls) || urls.isEmpty())
if(!KUrlDrag::decode(s, urls) || urls.isEmpty())
return;
// handle dropped images
......@@ -1102,7 +1102,7 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item)
QStringList fileList;
for(KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it)
for(KUrl::List::Iterator it = urls.begin(); it != urls.end(); ++it)
fileList += MediaFiles::convertURLsToLocal((*it).path(), this);
addFiles(fileList, item);
......
......@@ -413,11 +413,11 @@ void PlaylistBox::decode(QMimeSource *s, Item *item)
if(!s || (item && item->playlist() && item->playlist()->readOnly()))
return;
KURL::List urls;
KUrl::List urls;
if(KURLDrag::decode(s, urls) && !urls.isEmpty()) {
if(KUrlDrag::decode(s, urls) && !urls.isEmpty()) {
QStringList files;
for(KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it)
for(KUrl::List::Iterator it = urls.begin(); it != urls.end(); ++it)
files.append((*it).path());
if(item) {
......@@ -465,7 +465,7 @@ void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e)
//
// Otherwise, do not accept the event.
if(!KURLDrag::canDecode(e)) {
if(!KUrlDrag::canDecode(e)) {
e->accept(false);
return;
}
......
......@@ -18,7 +18,7 @@
#include <qlayout.h>
#include <qevent.h>
//Added by qt3to4:
#include <QVBoxLayout>
#include <Q3ValueList>
......
......@@ -19,7 +19,8 @@
#include <kfiledialog.h>
#include <q3widgetstack.h>
//Added by qt3to4:
#include <QSplitter>
#include <QEvent>
#include "playlistbox.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment