Commit 8ad05f42 authored by Scott Wheeler's avatar Scott Wheeler

CVS_SILENT more whitespace cleanup -- didn't let it run on the files with

lots of tabs in them, but I'm slowly moving away from the TT style
indentation to all spaces

svn path=/trunk/kdemultimedia/juk/; revision=288233
parent 19aa3d1f
......@@ -36,7 +36,7 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName,
AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName,
QWidget *parent,
const char *name) :
KDialogBase(parent, name, true, i18n("Create Search Playlist"), Ok|Cancel)
......
......@@ -40,7 +40,7 @@ public:
QString playlistName;
};
AdvancedSearchDialog(const QString &defaultName,
AdvancedSearchDialog(const QString &defaultName,
QWidget *parent = 0,
const char *name = 0);
......@@ -54,7 +54,7 @@ protected slots:
virtual void clear();
virtual void more();
virtual void fewer();
private:
void updateButtons();
......
......@@ -23,7 +23,7 @@
#include <qobject.h>
// Many months after writing this, despite having felt rather clever at the time
// I am now rather convinced that this is The Wrong Way (tm) to have handled
// I am now rather convinced that this is The Wrong Way (tm) to have handled
// things and will hopefully un-hack this later.
class CustomAction : public KAction
......
......@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////////////////////////
DirectoryList::DirectoryList(const QStringList &directories, QWidget *parent,
const char *name) :
const char *name) :
KDialogBase(parent, name, true, i18n("Folder List"), Ok | Cancel, Ok, true),
m_dirList(directories)
{
......@@ -38,14 +38,14 @@ DirectoryList::DirectoryList(const QStringList &directories, QWidget *parent,
m_base->directoryListView->setFullWidth(true);
connect(m_base->addDirectoryButton, SIGNAL(clicked()),
SLOT(slotAddDirectory()));
connect(m_base->removeDirectoryButton, SIGNAL(clicked()),
SLOT(slotRemoveDirectory()));
connect(m_base->addDirectoryButton, SIGNAL(clicked()),
SLOT(slotAddDirectory()));
connect(m_base->removeDirectoryButton, SIGNAL(clicked()),
SLOT(slotRemoveDirectory()));
QStringList::ConstIterator it = directories.begin();
for(; it != directories.end(); ++it)
new KListViewItem(m_base->directoryListView, *it);
new KListViewItem(m_base->directoryListView, *it);
QSize sz = sizeHint();
setMinimumSize(QMAX(350, sz.width()), QMAX(250, sz.height()));
......@@ -65,18 +65,18 @@ void DirectoryList::slotAddDirectory()
{
QString dir = KFileDialog::getExistingDirectory();
if(!dir.isEmpty() && m_dirList.find(dir) == m_dirList.end()) {
m_dirList.append(dir);
new KListViewItem(m_base->directoryListView, dir);
emit signalDirectoryAdded(dir);
m_dirList.append(dir);
new KListViewItem(m_base->directoryListView, dir);
emit signalDirectoryAdded(dir);
}
}
void DirectoryList::slotRemoveDirectory()
{
if(!m_base->directoryListView->selectedItem())
return;
return;
QString dir = m_base->directoryListView->selectedItem()->text(0);
QString dir = m_base->directoryListView->selectedItem()->text(0);
m_dirList.remove(dir);
emit signalDirectoryRemoved(dir);
delete m_base->directoryListView->selectedItem();
......
......@@ -32,8 +32,8 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists, QWidget *parent,
setSorting(columns() + 1);
for(PlaylistList::ConstIterator it = m_playlists.begin(); it != m_playlists.end(); ++it) {
connect(*it, SIGNAL(signalDataChanged()), this, SLOT(slotSetDirty()));
connect(*it, SIGNAL(signalCountChanged(Playlist *)), this, SLOT(slotSetDirty()));
connect(*it, SIGNAL(signalDataChanged()), this, SLOT(slotSetDirty()));
connect(*it, SIGNAL(signalCountChanged(Playlist *)), this, SLOT(slotSetDirty()));
}
connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()), this, SLOT(slotSetDirty()));
}
......@@ -45,7 +45,7 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists, QWidget *parent,
void DynamicPlaylist::slotReload()
{
for(PlaylistList::Iterator it = m_playlists.begin(); it != m_playlists.end(); ++it)
(*it)->slotReload();
(*it)->slotReload();
checkUpdateItems();
}
......@@ -76,7 +76,7 @@ void DynamicPlaylist::updateItems()
PlaylistItemList newSiblings = siblings;
if(m_siblings != newSiblings) {
m_siblings = newSiblings;
m_siblings = newSiblings;
QTimer::singleShot(0, this, SLOT(slotUpdateItems()));
}
}
......@@ -88,7 +88,7 @@ void DynamicPlaylist::updateItems()
void DynamicPlaylist::checkUpdateItems()
{
if(!m_dirty)
return;
return;
updateItems();
......
......@@ -48,7 +48,7 @@ protected:
bool dirty() const { return m_dirty; }
/**
* Return a list of the items in this playlist. For example in a search
* Return a list of the items in this playlist. For example in a search
* list this should return only the matched items. By default it returns
* all of the items in the playlists associated with this dynamic list.
*/
......
......@@ -92,9 +92,9 @@ QDataStream &operator<<(QDataStream &s, const HistoryPlaylist &p)
s << Q_INT32(l.count());
for(PlaylistItemList::ConstIterator it = l.begin(); it != l.end(); ++it) {
const HistoryPlaylistItem *i = static_cast<HistoryPlaylistItem *>(*it);
s << i->filePath();
s << i->dateTime();
const HistoryPlaylistItem *i = static_cast<HistoryPlaylistItem *>(*it);
s << i->filePath();
s << i->dateTime();
}
return s;
......@@ -111,11 +111,11 @@ QDataStream &operator>>(QDataStream &s, HistoryPlaylist &p)
QDateTime dateTime;
for(int i = 0; i < count; i++) {
s >> fileName;
s >> dateTime;
s >> fileName;
s >> dateTime;
after = p.createItem<HistoryPlaylistItem, CollectionListItem, CollectionList>(QFileInfo(fileName), fileName, after, false);
after->setDateTime(dateTime);
after = p.createItem<HistoryPlaylistItem, CollectionListItem, CollectionList>(QFileInfo(fileName), fileName, after, false);
after->setDateTime(dateTime);
}
p.emitCountChanged();
......
......@@ -74,8 +74,8 @@ KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, QW
int selectedButton;
KConfig *config = KGlobal::config();
{
KConfigGroupSaver saver(config, "Shortcuts");
selectedButton = config->readNumEntry("GlobalKeys", StandardKeys);
KConfigGroupSaver saver(config, "Shortcuts");
selectedButton = config->readNumEntry("GlobalKeys", StandardKeys);
}
// Create widgets for key chooser - widget stack used to replace key chooser
......@@ -121,13 +121,13 @@ int KeyDialog::configure()
// Show the dialog and save configuration if accepted
int retcode = exec();
if(retcode == Accepted) {
KConfig *config = KGlobal::config();
{
KConfigGroupSaver saver(config, "Shortcuts");
config->writeEntry("GlobalKeys", m_group->id(m_group->selected()));
config->sync();
}
m_pKeyChooser->save();
KConfig *config = KGlobal::config();
{
KConfigGroupSaver saver(config, "Shortcuts");
config->writeEntry("GlobalKeys", m_group->id(m_group->selected()));
config->sync();
}
m_pKeyChooser->save();
}
return retcode;
}
......@@ -138,7 +138,7 @@ void KeyDialog::slotKeys(int group)
// Set modifier keys according to key group and modifier keys
for (uint i = 0; i < keyInfoCount; i++)
m_keys->setShortcut(keyInfo[i].action, keyInfo[i].shortcut[group][fourModKeys]);
m_keys->setShortcut(keyInfo[i].action, keyInfo[i].shortcut[group][fourModKeys]);
// Create a new key chooser to show the keys, and delete the old one
QWidget *w = m_widgetStack->visibleWidget();
......@@ -160,7 +160,7 @@ int KeyDialog::configure(KGlobalAccel *keys, KActionCollection *actionCollection
KeyDialog dlg(keys, actionCollection, parent);
int retcode = dlg.configure();
if (retcode == Accepted)
keys->updateConnections();
keys->updateConnections();
return retcode;
}
......@@ -172,11 +172,11 @@ void KeyDialog::insert(KGlobalAccel* keys, const QString& action, const QString&
// Find and insert a standard key
for (uint i = 0; i < keyInfoCount; i++)
if (keyInfo[i].action == action) {
def3 = keyInfo[i].shortcut[StandardKeys][0];
def4 = keyInfo[i].shortcut[StandardKeys][1];
break;
}
if (keyInfo[i].action == action) {
def3 = keyInfo[i].shortcut[StandardKeys][0];
def4 = keyInfo[i].shortcut[StandardKeys][1];
break;
}
keys->insert(action, label, QString::null, def3, def4, objSlot, methodSlot);
}
......
......@@ -54,7 +54,7 @@ public:
* standard keys. It behaves like the function in KGlobalAccel.
*/
static void insert(KGlobalAccel *keys, const QString& action, const QString& label,
const QObject *objSlot, const char *methodSlot);
const QObject *objSlot, const char *methodSlot);
private:
......@@ -64,10 +64,10 @@ private:
enum KeyGroup { NoKeys = 0, StandardKeys = 1, MultimediaKeys = 2 };
struct KeyInfo {
QString action;
KShortcut shortcut[3][2];
QString action;
KShortcut shortcut[3][2];
};
void newDialog(KGlobalAccel *keys, KActionCollection *actionCollection, int selectedButton = 0);
int configure();
......
......@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
// Here we do some DCOP locking of sorts to prevent incoming DCOP calls
// before JuK has finished its initialization.
a.dcopClient()->suspend();
JuK *juk = new JuK();
a.dcopClient()->resume();
......
......@@ -28,7 +28,7 @@ namespace MediaFiles {
static const char oggType[] = "application/ogg";
static const char flacType[] = "audio/x-flac";
static const char m3uType[] = "audio/x-mpegurl";
static const char playlistExtension[] = ".m3u";
}
......@@ -36,7 +36,7 @@ QStringList MediaFiles::openDialog(QWidget *parent)
{
KFileDialog dialog(QString::null, QString::null, parent, "filedialog", true);
dialog.setOperationMode(KFileDialog::Opening);
dialog.setCaption(i18n("Open"));
dialog.setMode(KFile::Files | KFile::LocalOnly);
// dialog.ops->clearHistory();
......@@ -50,19 +50,19 @@ QStringList MediaFiles::openDialog(QWidget *parent)
QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *parent)
{
QString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension,
QString("*").append(playlistExtension),
parent,
i18n("Playlists"));
QString("*").append(playlistExtension),
parent,
i18n("Playlists"));
if(!fileName.isEmpty() && !fileName.endsWith(playlistExtension))
fileName.append(playlistExtension);
return fileName;
}
bool MediaFiles::isMediaFile(const QString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(mp3Type) || result->is(oggType) || result->is(flacType);
}
......
......@@ -101,7 +101,7 @@ void MusicBrainzQuery::slotQuery()
Track track(extractTrack(i));
tracks.append(track);
}
else {
else {
Album album(extractAlbum());
albums.append(album);
}
......
......@@ -66,7 +66,7 @@ void SearchPlaylist::updateItems()
if(!oldItems.isEmpty() && newItems.isEmpty())
emit signalCountChanged(this);
createItems(newItems);
}
......
......@@ -26,12 +26,12 @@ class SearchPlaylist : public DynamicPlaylist
Q_OBJECT
public:
SearchPlaylist(QWidget *parent,
const PlaylistSearch &search = PlaylistSearch(),
const QString &name = QString::null);
const PlaylistSearch &search = PlaylistSearch(),
const QString &name = QString::null);
PlaylistSearch playlistSearch() const { return m_search; }
void setPlaylistSearch(const PlaylistSearch &s) { m_search = s; }
protected:
/**
* Runs the search to update the current items.
......
......@@ -32,7 +32,7 @@
////////////////////////////////////////////////////////////////////////////////
/**
* This "custom" slider reverses the left and middle buttons. Typically the
* This "custom" slider reverses the left and middle buttons. Typically the
* middle button "instantly" seeks rather than moving the slider towards the
* click position in fixed intervals. This behavior has now been mapped on
* to the left mouse button.
......@@ -47,12 +47,12 @@ protected:
virtual void mousePressEvent(QMouseEvent *e) {
if(e->button() == LeftButton) {
QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), MidButton, e->state());
QSlider::mousePressEvent(&reverse);
QSlider::mousePressEvent(&reverse);
emit sliderPressed();
}
}
else if(e->button() == MidButton) {
QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), LeftButton, e->state());
QSlider::mousePressEvent(&reverse);
QSlider::mousePressEvent(&reverse);
}
}
virtual void focusInEvent(QFocusEvent *) { clearFocus(); }
......@@ -145,7 +145,7 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
volumeLabel->setName("kde toolbar widget");
volumeLabel->setPixmap(SmallIcon("juk_volume"));
QToolTip::add(volumeLabel, i18n("Volume"));
m_layout->addWidget(volumeLabel);
m_layout->addWidget(volumeLabel);
m_volumeSlider = new VolumeSlider(base, "volumeSlider");
m_volumeSlider->setMaxValue(100);
......
......@@ -35,7 +35,7 @@ int SplashScreen::count = 0;
SplashScreen *SplashScreen::instance()
{
if(!splash && !done)
splash = new SplashScreen();
splash = new SplashScreen();
return splash;
}
......@@ -49,9 +49,9 @@ void SplashScreen::finishedLoading()
void SplashScreen::increment()
{
if(splash) {
count++;
if(( count & 63 ) == 0)
splash->processEvents();
count++;
if(( count & 63 ) == 0)
splash->processEvents();
}
}
......@@ -67,13 +67,13 @@ SplashScreen::SplashScreen() : QHBox(0 , "splashScreen", Qt::WStyle_Splash)
setLineWidth(5);
setFrameShape(Box);
setFrameShadow(Plain);
QFont font = QWidget::font();
if(font.pixelSize() > 0)
font.setPixelSize(font.pixelSize() * 2);
font.setPixelSize(font.pixelSize() * 2);
else
font.setPointSize(font.pointSize() * 2);
font.setPointSize(font.pointSize() * 2);
QLabel *iconLabel = new QLabel(this);
iconLabel->setPixmap(DesktopIcon("juk"));
......@@ -85,7 +85,7 @@ SplashScreen::SplashScreen() : QHBox(0 , "splashScreen", Qt::WStyle_Splash)
m_countLabel->setText(QString::number(count));
m_countLabel->setFont(font);
m_countLabel->setMinimumWidth(m_countLabel->fontMetrics().width("00000"));
setMaximumWidth(iconLabel->width() + textLabel->width() + m_countLabel->width() + 10);
setMaximumHeight(QMAX(iconLabel->height(), textLabel->height()));
......
......@@ -25,17 +25,17 @@ class QLabel;
/**
* Well, all of this session restoration sure is fun, but it's starting to take
* a while, especially say, if you're building KDE and indexing your file system
* in the background. ;-) So, despite my general hate of splashscreens I
* in the background. ;-) So, despite my general hate of splashscreens I
* thought on appropriate here.
*
* As in other places, this is a singleton. That makes it relatively easy to
* As in other places, this is a singleton. That makes it relatively easy to
* handle the updates from whichever class seems appropriate through static
* methods.
*/
class SplashScreen : public QHBox
class SplashScreen : public QHBox
{
public:
public:
static SplashScreen *instance();
static void finishedLoading();
static void increment();
......
......@@ -23,14 +23,14 @@
/**
This class attempts to normalize repeated occurances of strings to use
the same shared object, if possible, by using a small hash
*/
*/
class StringShare
{
struct Data;
public:
static QString tryShare(const QString& in);
static QCString tryShare(const QCString& in);
private:
static Data* data();
static Data* s_data;
......
......@@ -33,7 +33,7 @@
TrackPickerDialog::TrackPickerDialog(const QString &fileName,
const MusicBrainzQuery::TrackList &tracks,
QWidget *parent,
QWidget *parent,
const char *name) :
KDialogBase(parent, name, true, i18n("Internet Tag Guesser"), Ok | Cancel, Ok, true)
{
......
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