Commit a0759bab authored by Kacper Kasper's avatar Kacper Kasper

Mark all commented out code with FIXME.

parent dbfddf59
......@@ -48,6 +48,7 @@ public:
virtual ~AdvancedSearchDialog();
public slots:
// FIXME
//Result exec();
int exec();
......
......@@ -172,6 +172,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static
if(version >= 2) {
qint32 sortColumn;
s >> sortColumn;
// FIXME
if(playlist)
playlist->model()->sort(sortColumn);
}
......@@ -270,6 +271,7 @@ void Cache::savePlaylists(const PlaylistList &playlists)
s << qint32(Normal)
<< *(*it);
}
// FIXME
//s << qint32((*it)->sortColumn());
s << 0;
}
......
......@@ -390,6 +390,7 @@ void CollectionList::contentsDropEvent(QDropEvent *e)
void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e)
{
// FIXME
/*if(e->source() != this)
Playlist::contentsDragMoveEvent(e);
else*/
......@@ -501,6 +502,7 @@ void CollectionListItem::refresh()
data()->metadata[id] = toLower;
}
// FIXME
/*int newWidth = width(listView()->fontMetrics(), listView(), i);
if(newWidth != data()->cachedWidths[i])
playlist()->slotWeightDirty(i);
......@@ -514,6 +516,7 @@ void CollectionListItem::refresh()
for(PlaylistItemList::Iterator it = m_children.begin(); it != m_children.end(); ++it) {
(*it)->playlist()->update();
(*it)->playlist()->dataChanged();
// FIXME
/*if((*it)->treeWidget()->isVisible())
(*it)->repaint();*/
}
......@@ -547,6 +550,7 @@ void CollectionListItem::updateCollectionDict(const QString &oldPath, const QStr
void CollectionListItem::repaint() const
{
// FIXME
/*QItemDelegate::repaint();
for(PlaylistItemList::ConstIterator it = m_children.constBegin(); it != m_children.constEnd(); ++it)
(*it)->repaint();*/
......
......@@ -83,6 +83,7 @@ int DirectoryList::exec()
{
m_result.status = static_cast<DialogCode>(KDialog::exec());
m_result.addPlaylists = m_base->importPlaylistsCheckBox->isChecked();
// FIXME
//return m_result;
return 0;
}
......
......@@ -50,6 +50,7 @@ public:
virtual ~DirectoryList();
public slots:
// FIXME
int exec();
signals:
......
......@@ -378,6 +378,7 @@ void JuK::setupGlobalAccels()
void JuK::slotProcessArgs()
{
// FIXME
/*KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
QStringList files;
......
......@@ -28,6 +28,7 @@
#include <QObject>
// FIXME
#if 0
template<class T>
......
......@@ -44,6 +44,7 @@ LyricsWidget::LyricsWidget(QWidget* parent): QTextBrowser(parent),
KToggleAction *show = new KToggleAction(KIcon(QLatin1String("view-media-lyrics")),
i18n("Show &Lyrics"), this);
ActionCollection::actions()->addAction("showLyrics", show);
// FIXME
//connect(show, SIGNAL(toggled(bool)), this, SLOT(setShown(bool)));
KConfigGroup config(KGlobal::config(), "LyricsWidget");
......
......@@ -50,7 +50,7 @@ static const char sho[] = I18N_NOOP("MPRIS2 Interface implementation.");
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QApplication a(argc, argv);
KLocalizedString::setApplicationDomain("juk");
KAboutData aboutData(QStringLiteral("juk"), i18n("JuK"),
......@@ -81,6 +81,7 @@ int main(int argc, char *argv[])
aboutData.addCredit(i18n("Eike Hein"), i18n(sho), "hein@kde.org");
KAboutData::setApplicationData(aboutData);
// FIXME
/*KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineOptions options;
......@@ -93,25 +94,25 @@ int main(int argc, char *argv[])
// If this flag gets set then JuK will quit if you click the cover on the track
// announcement popup when JuK is only in the system tray (the systray has no widget).
app.setQuitOnLastWindowClosed(false);
a.setQuitOnLastWindowClosed(false);
// Create the main window and such
JuK *juk = new JuK;
if(app.isSessionRestored() && KMainWindow::canBeRestored(1))
if(a.isSessionRestored() && KMainWindow::canBeRestored(1))
juk->restore(1, false /* don't show */);
KConfigGroup config(KGlobal::config(), "Settings");
if(!config.readEntry("StartDocked", false)) {
juk->show();
}
else if(!app.isSessionRestored()) {
else if(!a.isSessionRestored()) {
QString message = i18n("JuK running in docked mode\nUse context menu in system tray to restore.");
KNotification::event("dock_mode",i18n("JuK Docked"), message);
}
return app.exec();
return a.exec();
}
// vim: set et sw=4 tw=0 sta fileencoding=utf8:
......@@ -1016,6 +1016,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
}
}
// FIXME
/*Q3DragObject *Playlist::dragObject(QWidget *parent)
{
PlaylistItemList items = selectedItems();
......@@ -1162,6 +1163,7 @@ void Playlist::keyPressEvent(QKeyEvent *event)
void Playlist::contentsDropEvent(QDropEvent *e)
{
// FIXME
/*QPoint vp = contentsToViewport(e->pos());
PlaylistItem *item = static_cast<PlaylistItem *>(itemAt(vp));
......@@ -1237,6 +1239,7 @@ void Playlist::contentsMouseDoubleClickEvent(QMouseEvent *e)
// Filter out non left button double clicks, that way users don't have the
// weird experience of switching songs from a double right-click.
// FIXME
/*if(e->button() == Qt::LeftButton)
QTreeWidget::contentsMouseDoubleClickEvent(e);*/
}
......@@ -1298,6 +1301,7 @@ void Playlist::viewportPaintEvent(QPaintEvent *pe)
slotUpdateColumnWidths();
}
// FIXME
//QTreeWidget::viewportPaintEvent(pe);
}
......@@ -1309,6 +1313,7 @@ void Playlist::viewportResizeEvent(QResizeEvent *re)
if(re->size().width() != re->oldSize().width() && !manualResize())
slotUpdateColumnWidths();
// FIXME
//QTreeWidget::viewportResizeEvent(re);
}
......@@ -1327,6 +1332,7 @@ void Playlist::takeItem(QTreeWidgetItem *item)
{
// See the warning in Playlist::insertItem.
// FIXME
/*m_subtractTime.append(static_cast<PlaylistItem *>(item));
QTreeWidget::takeItem(item);*/
}
......@@ -1398,8 +1404,8 @@ void Playlist::refreshAlbums(const PlaylistItemList &items, coverKey id)
void Playlist::updatePlaying() const
{
/*foreach(const PlaylistItem *item, PlaylistItem::playingItems())
item->treeWidget()->triggerUpdate();*/
foreach(const PlaylistItem *item, PlaylistItem::playingItems())
item->treeWidget()->viewport()->update();
}
void Playlist::refreshAlbum(const QString &artist, const QString &album)
......@@ -1443,12 +1449,14 @@ void Playlist::hideColumn(int c, bool updateSearch)
if(!isColumnVisible(c))
return;
// FIXME
//setColumnWidthMode(c, Manual);
setColumnWidth(c, 0);
// Moving the column to the end seems to prevent it from randomly
// popping up.
// FIXME
header()->moveSection(c, header()->count());
//header()->setResizeEnabled(false, c);
......@@ -1459,6 +1467,7 @@ void Playlist::hideColumn(int c, bool updateSearch)
if(!manualResize()) {
slotUpdateColumnWidths();
// FIXME
//triggerUpdate();
}
......@@ -1492,6 +1501,7 @@ void Playlist::showColumn(int c, bool updateSearch)
else
setColumnWidth(c, 1);
// FIXME
//header()->setResizeEnabled(true, c);
header()->moveSection(c, c); // Approximate old position
......@@ -1502,6 +1512,7 @@ void Playlist::showColumn(int c, bool updateSearch)
if(!manualResize()) {
slotUpdateColumnWidths();
// FIXME
//triggerUpdate();
}
......@@ -1532,6 +1543,7 @@ void Playlist::slotInitialize()
addColumn(i18n("File Name"));
addColumn(i18n("File Name (full path)"));
// FIXME
/*setRenameable(PlaylistItem::TrackColumn, true);
setRenameable(PlaylistItem::ArtistColumn, true);
setRenameable(PlaylistItem::AlbumColumn, true);
......@@ -1557,6 +1569,7 @@ void Playlist::slotInitialize()
QAction *showAction;
// FIXME
/*for(int i = 0; i < header()->count(); ++i) {
if(i - columnOffset() == PlaylistItem::FileNameColumn)
m_headerMenu->addSeparator();
......@@ -1572,6 +1585,7 @@ void Playlist::slotInitialize()
connect(m_headerMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotToggleColumnVisible(QAction*)));
// FIXME
/* connect(this, SIGNAL(contextMenuRequested(QTreeWidgetItem*,QPoint,int)),
this, SLOT(slotShowRMBMenu(QTreeWidgetItem*,QPoint,int)));
connect(this, SIGNAL(itemRenamed(QTreeWidgetItem*,QString,int)),
......@@ -1584,6 +1598,7 @@ void Playlist::slotInitialize()
connect(header(), SIGNAL(geometriesChanged()),
this, SLOT(slotColumnSizeChanged(int, int, int)));
// FIXME
/*connect(renameLineEdit(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
this, SLOT(slotInlineCompletionModeChanged(KGlobalSettings::Completion)));*/
......@@ -1600,6 +1615,7 @@ void Playlist::slotInitialize()
m_disableColumnWidthUpdates = false;
// FIXME
//setShowToolTips(false);
/* m_toolTip = new PlaylistToolTip(viewport(), this); */
}
......@@ -1615,6 +1631,7 @@ void Playlist::setupItem(PlaylistItem *item)
if(topLevelItemCount() <= 2 && !manualResize()) {
slotWeightDirty();
slotUpdateColumnWidths();
// FIXME
//triggerUpdate();
}
}
......@@ -1686,6 +1703,7 @@ void Playlist::slotPlayFromBackMenu(QAction *backAction) const
void Playlist::setup()
{
// FIXME
//setItemMargin(3);
setRootIsDecorated(false);
......@@ -2195,6 +2213,7 @@ void Playlist::slotRenameTag()
{
// setup completions and validators
// FIXME
/*CollectionList *list = CollectionList::instance();
KLineEdit *edit = renameLineEdit();
......@@ -2268,6 +2287,7 @@ bool Playlist::editTag(PlaylistItem *item, const QString &text, int column)
void Playlist::slotInlineEditDone(QTreeWidgetItem *, const QString &, int column)
{
// FIXME
/*QString text = renameLineEdit()->text();
bool changed = false;
......
......@@ -76,6 +76,7 @@ PlaylistBox::PlaylistBox(PlayerManager *player, QWidget *parent, QStackedWidget
readConfig();
setHeaderLabel("Playlists");
// FIXME
/*header()->blockSignals(true);
header()->hide();
header()->blockSignals(false);
......@@ -140,6 +141,7 @@ PlaylistBox::PlaylistBox(PlayerManager *player, QWidget *parent, QStackedWidget
connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
this, SLOT(slotDoubleClicked(QTreeWidgetItem*)));
// FIXME
/*connect(this, SIGNAL(contextMenuRequested(QTreeWidgetItem*,QPoint,int)),
this, SLOT(slotShowContextMenu(QTreeWidgetItem*,QPoint,int)));*/
......@@ -193,6 +195,7 @@ void PlaylistBox::raise(Playlist *playlist)
Item *i = m_playlistDict.value(playlist, 0);
if(i) {
// FIXME
clearSelection();
//setSelected(i, true);
......@@ -377,6 +380,7 @@ void PlaylistBox::remove()
}
}
// FIXME
/*if(items.back()->nextSibling() && static_cast<Item *>(items.back()->nextSibling())->playlist())
setSingleItem(items.back()->nextSibling());
else {
......@@ -486,6 +490,7 @@ void PlaylistBox::contentsDropEvent(QDropEvent *e)
{
m_showTimer->stop();
// FIXME
/*Item *i = static_cast<Item *>(itemAt(contentsToViewport(e->pos())));
decode(e->mimeData(), i);
......@@ -504,6 +509,7 @@ void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e)
//
// Otherwise, do not accept the event.
// FIXME
/*if (!KUrl::List::canDecode(e->mimeData())) {
e->setAccepted(false);
return;
......@@ -562,6 +568,7 @@ void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e)
void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e)
{
// FIXME
/*if(m_dropItem) {
Item *old = m_dropItem;
m_dropItem = 0;
......@@ -572,6 +579,7 @@ void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e)
void PlaylistBox::contentsMousePressEvent(QMouseEvent *e)
{
// FIXME
/*if(e->button() == Qt::LeftButton)
m_doingMultiSelect = true;
QTreeWidget::contentsMousePressEvent(e);*/
......@@ -579,6 +587,7 @@ void PlaylistBox::contentsMousePressEvent(QMouseEvent *e)
void PlaylistBox::contentsMouseReleaseEvent(QMouseEvent *e)
{
// FIXME
/*if(e->button() == Qt::LeftButton) {
m_doingMultiSelect = false;
slotPlaylistChanged();
......@@ -615,6 +624,7 @@ PlaylistBox::ItemList PlaylistBox::selectedBoxItems() const
void PlaylistBox::setSingleItem(QTreeWidgetItem *item)
{
// FIXME
/*setSelectionModeExt(Single);
K3ListView::setCurrentItem(item);
setSelectionModeExt(Extended);*/
......@@ -760,6 +770,7 @@ void PlaylistBox::slotLoadCachedPlaylists()
connect(m_savePlaylistTimer, SIGNAL(timeout()), SLOT(slotSavePlaylists()));
clearSelection();
// FIXME
//setSelected(m_playlistDict[CollectionList::instance()], true);
QTimer::singleShot(0, CollectionList::instance(), SLOT(slotCheckCache()));
......@@ -811,6 +822,7 @@ int PlaylistBox::Item::compare(QTreeWidgetItem *i, int col, bool) const
return text(col).toLower().localeAwareCompare(i->text(col).toLower());
}
// FIXME
/*void PlaylistBox::Item::paintCell(QPainter *painter, const QColorGroup &colorGroup, int column, int width, int align)
{
PlaylistBox *playlistBox = static_cast<PlaylistBox *>(listView());
......@@ -838,6 +850,7 @@ void PlaylistBox::Item::slotSetName(const QString &name)
setText(0, name);
setSelected(true);
// FIXME
/*listView()->sort();
listView()->ensureItemVisible(listView()->currentItem());*/
listView()->viewMode()->queueRefresh();
......
......@@ -374,6 +374,7 @@ void PlaylistCollection::open(const QString &playlist, const QStringList &files)
void PlaylistCollection::addFolder()
{
DirectoryList l(m_folderList, m_excludedFolderList, m_importPlaylists, JuK::JuKInstance());
// FIXME
//DirectoryList::Result result = l.exec();
/*if(result.status == QDialog::Accepted) {
......@@ -457,6 +458,7 @@ void PlaylistCollection::editSearch()
if(!p)
return;
// FIXME
/*AdvancedSearchDialog::Result r =
AdvancedSearchDialog(p->name(), p->playlistSearch(), JuK::JuKInstance()).exec();
......@@ -529,6 +531,7 @@ void PlaylistCollection::createSearchPlaylist()
{
QString name = uniquePlaylistName(i18n("Search Playlist"));
// FIXME
/*AdvancedSearchDialog::Result r =
AdvancedSearchDialog(name, PlaylistSearch(), JuK::JuKInstance()).exec();
......
......@@ -280,9 +280,11 @@ PlaylistItem::PlaylistItem(CollectionList *parent) :
{
d = new Data;
m_collectionItem = static_cast<CollectionListItem *>(this);
// FIXME
//setDragEnabled(true);
}
// FIXME
/*void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
{
if(!m_playingItems.contains(this))
......@@ -412,6 +414,7 @@ void PlaylistItem::setup(CollectionListItem *item)
d = item->d;
item->addChildItem(this);
// FIXME
//setDragEnabled(true);
}
......
......@@ -125,6 +125,7 @@ void PlaylistSplitter::slotFocusCurrentPlaylist()
if(playlist) {
playlist->setFocus();
// FIXME
//playlist->selectAll(false);
// Select the top visible (and matching) item.
......@@ -137,11 +138,13 @@ void PlaylistSplitter::slotFocusCurrentPlaylist()
// A little bit of a hack to make QListView repaint things properly. Switch
// to single selection mode, set the selection and then switch back.
// FIXME
//playlist->setSelectionMode(Q3ListView::Single);
playlist->markItemSelected(item, true);
playlist->setCurrentItem(item);
// FIXME
//playlist->setSelectionMode(Q3ListView::Extended);
}
}
......@@ -262,6 +265,7 @@ void PlaylistSplitter::setupLayout()
m_editor, SLOT(slotUpdateCollection()));
connect(m_playlistStack, SIGNAL(currentChanged(int)), this, SLOT(slotPlaylistChanged(int)));
// FIXME
// Show the collection on startup.
//m_playlistBox->setSelected(0, true);
}
......
......@@ -184,6 +184,7 @@ SystemTray::SystemTray(PlayerManager *player, QWidget *parent) :
// Pity the actionCollection doesn't keep track of what sub-menus it has.
KActionMenu *menu = new KActionMenu(i18n("&Random Play"), this);
// FIXME
//actionCollection()->addAction("randomplay", menu);
menu->addAction(action("disableRandomPlay"));
menu->addAction(action("randomPlay"));
......
......@@ -465,6 +465,7 @@ void TagEditor::readCompletionMode(const KConfigGroup &config, KComboBox *box, c
KGlobalSettings::Completion mode =
KGlobalSettings::Completion(config.readEntry(key, (int)KGlobalSettings::CompletionAuto));
// FIXME
//box->setCompletionMode(mode);
}
......@@ -487,6 +488,7 @@ void TagEditor::setupActions()
KToggleAction *show = new KToggleAction(KIcon(QLatin1String("document-properties")),
i18n("Show &Tag Editor"), this);
ActionCollection::actions()->addAction("showEditor", show);
// FIXME
//connect(show, SIGNAL(toggled(bool)), this, SLOT(setShown(bool)));
KAction *act = new KAction(KIcon(QLatin1String( "document-save")), i18n("&Save"), this);
......@@ -500,6 +502,7 @@ void TagEditor::setupLayout()
setupUi(this);
foreach(QWidget *input, findChildren<QWidget *>()) {
// FIXME
/*if(input->inherits("QLineEdit") || input->inherits("QComboBox"))
connect(input, SIGNAL(textChanged(QString)), this, SLOT(slotDataChanged()));
if(input->inherits("QComboxBox"))
......
......@@ -179,6 +179,7 @@ bool TagTransactionManager::processChangeList(bool undo)
item->file().setFile(tag->fileName());
item->refreshFromDisk();
// FIXME
//item->repaint();
item->playlist()->dataChanged();
item->playlist()->update();
......
......@@ -146,6 +146,7 @@ void DefaultSequenceIterator::advance()
if(!next && loop) {
Playlist *p = current()->playlist();
next = p->firstChild();
// FIXME
/*while(next && !next->isVisible())
next = static_cast<PlaylistItem *>(next->nextSibling());*/
}
......
......@@ -47,6 +47,7 @@ ViewMode::~ViewMode()
}
// FIXME
/*void ViewMode::paintCell(PlaylistBox::Item *item,
QPainter *painter,
const QColorGroup &colorGroup,
......@@ -178,6 +179,7 @@ void ViewMode::updateIcons(int size)
void ViewMode::setupItem(PlaylistBox::Item *item) const
{
// FIXME
/*const PlaylistBox *box = item->listView();
const int width = box->width() - box->verticalScrollBar()->width() - border * 2;
const int baseHeight = 2 * box->itemMargin() + 32 + border * 2;
......@@ -187,6 +189,7 @@ void ViewMode::setupItem(PlaylistBox::Item *item) const
void ViewMode::updateHeights()
{
// FIXME
/*const int width = m_playlistBox->width() - m_playlistBox->verticalScrollBar()->width() - border * 2;
const int baseHeight = 2 * m_playlistBox->itemMargin() + 32 +
......@@ -235,6 +238,7 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item,
while(!line.isEmpty()) {
int textLength = line.length();
// FIXME
/*while(textLength > 0 &&
fm.width(line.mid(0, textLength).trimmed()) +
item->listView()->itemMargin() * 2 > width)
......@@ -266,6 +270,7 @@ CompactViewMode::~CompactViewMode()
}
// FIXME
/*void CompactViewMode::paintCell(PlaylistBox::Item *item,
QPainter *painter,
const QColorGroup &colorGroup,
......@@ -293,6 +298,7 @@ void CompactViewMode::setShown(bool shown)
void CompactViewMode::updateHeights()
{
// FIXME
/*for(Q3ListViewItemIterator it(playlistBox()); it.current(); ++it)
it.current()->setup();*/
}
......@@ -323,6 +329,7 @@ void TreeViewMode::setShown(bool show)
playlistBox()->setRootIsDecorated(show);
// FIXME
/*if(show) {
PlaylistBox::Item *collectionItem = PlaylistBox::Item::collectionItem();
......
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