Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 17c1e4d1 authored by Kacper Kasper's avatar Kacper Kasper

Fix some FIXMEs and tag remaining ones.

parent cd983501
......@@ -138,7 +138,7 @@ AdvancedSearchDialog::~AdvancedSearchDialog()
//AdvancedSearchDialog::Result AdvancedSearchDialog::exec()
int AdvancedSearchDialog::exec()
{
return 0; // FIXME
return 0; // FIXME signal
Result r;
r.result = DialogCode(KDialog::exec());
r.search = m_search;
......
......@@ -48,7 +48,7 @@ public:
virtual ~AdvancedSearchDialog();
public slots:
// FIXME
// FIXME signal
//Result exec();
int exec();
......
......@@ -385,7 +385,7 @@ void CollectionList::contentsDropEvent(QDropEvent *e)
void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e)
{
// FIXME
// FIXME drag
/*if(e->source() != this)
Playlist::contentsDragMoveEvent(e);
else*/
......@@ -540,7 +540,7 @@ void CollectionListItem::updateCollectionDict(const QString &oldPath, const QStr
void CollectionListItem::repaint() const
{
// FIXME
// FIXME repaint
/*QItemDelegate::repaint();
for(PlaylistItemList::ConstIterator it = m_children.constBegin(); it != m_children.constEnd(); ++it)
(*it)->repaint();*/
......
......@@ -83,7 +83,7 @@ int DirectoryList::exec()
{
m_result.status = static_cast<DialogCode>(KDialog::exec());
m_result.addPlaylists = m_base->importPlaylistsCheckBox->isChecked();
// FIXME
// FIXME signal
//return m_result;
return 0;
}
......
......@@ -50,7 +50,7 @@ public:
virtual ~DirectoryList();
public slots:
// FIXME
// FIXME signal
int exec();
signals:
......
......@@ -378,7 +378,7 @@ void JuK::setupGlobalAccels()
void JuK::slotProcessArgs()
{
// FIXME
// FIXME cmdline args
/*KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
QStringList files;
......
......@@ -28,7 +28,7 @@
#include <QObject>
// FIXME
// FIXME ktrm
#if 0
template<class T>
......
......@@ -44,8 +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)));
connect(show, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool)));
KConfigGroup config(KGlobal::config(), "LyricsWidget");
bool shown = config.readEntry("Show", true);
......
......@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
aboutData.addCredit(i18n("Eike Hein"), i18n(sho), "hein@kde.org");
KAboutData::setApplicationData(aboutData);
// FIXME
// FIXME cmdline
/*KCmdLineArgs::init(argc, argv, &aboutData);
KCmdLineOptions options;
......
......@@ -129,7 +129,7 @@ QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *par
TagLib::File *MediaFiles::fileFactoryByType(const QString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName);
// FIXME
// FIXME mimetype no isvalid
//if(!result->isValid())
// return 0;
......@@ -169,7 +169,7 @@ TagLib::File *MediaFiles::fileFactoryByType(const QString &fileName)
bool MediaFiles::isMediaFile(const QString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName);
// FIXME
// FIXME mimetype no isvalid
/*if(!result->isValid())
return false;*/
......
......@@ -77,7 +77,7 @@ bool MediaPlayer2::HasTrackList() const
QString MediaPlayer2::Identity() const
{
// FIXME
// FIXME cmdline args
//return KCmdLineArgs::aboutData()->programName();
return "JuK";
}
......
......@@ -253,7 +253,7 @@ void Playlist::SharedSettings::apply(Playlist *l) const
}
l->updateLeftColumn();
// FIXME
// FIXME rename
//l->renameLineEdit()->setCompletionMode(m_inlineCompletion);
l->slotColumnResizeModeChanged();
}
......@@ -1019,7 +1019,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
}
}
// FIXME
// FIXME drag
/*Q3DragObject *Playlist::dragObject(QWidget *parent)
{
PlaylistItemList items = selectedItems();
......@@ -1166,7 +1166,7 @@ void Playlist::keyPressEvent(QKeyEvent *event)
void Playlist::contentsDropEvent(QDropEvent *e)
{
// FIXME
// FIXME drag
/*QPoint vp = contentsToViewport(e->pos());
PlaylistItem *item = static_cast<PlaylistItem *>(itemAt(vp));
......@@ -1514,7 +1514,7 @@ void Playlist::slotInitialize()
addColumn(i18n("File Name"));
addColumn(i18n("File Name (full path)"));
// FIXME
// FIXME rename
/*setRenameable(PlaylistItem::TrackColumn, true);
setRenameable(PlaylistItem::ArtistColumn, true);
setRenameable(PlaylistItem::AlbumColumn, true);
......@@ -1555,17 +1555,18 @@ void Playlist::slotInitialize()
connect(m_headerMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotToggleColumnVisible(QAction*)));
// FIXME
connect(this, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(slotShowRMBMenu(QPoint)));
// FIXME rename
/*connect(this, SIGNAL(itemRenamed(QTreeWidgetItem*,QString,int)),
this, SLOT(slotInlineEditDone(QTreeWidgetItem*,QString,int)));*/
connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
this, SLOT(slotPlayCurrent()));
// FIXME returnPressed
/*connect(this, SIGNAL(returnPressed(QTreeWidgetItem*)),
this, SLOT(slotPlayCurrent()));*/
// FIXME
// FIXME rename
/*connect(renameLineEdit(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
this, SLOT(slotInlineCompletionModeChanged(KGlobalSettings::Completion)));*/
......@@ -1585,7 +1586,7 @@ void Playlist::slotInitialize()
m_disableColumnWidthUpdates = false;
// FIXME
// FIXME tooltips
//setShowToolTips(false);
/* m_toolTip = new PlaylistToolTip(viewport(), this); */
}
......@@ -1601,8 +1602,7 @@ void Playlist::setupItem(PlaylistItem *item)
if(topLevelItemCount() <= 2 && !manualResize()) {
slotWeightDirty();
slotUpdateColumnWidths();
// FIXME
//triggerUpdate();
viewport()->update();
}
}
......@@ -1673,8 +1673,6 @@ void Playlist::slotPlayFromBackMenu(QAction *backAction) const
void Playlist::setup()
{
// FIXME
//setItemMargin(3);
setRootIsDecorated(false);
setContextMenuPolicy(Qt::CustomContextMenu);
......@@ -2186,7 +2184,7 @@ void Playlist::slotRenameTag()
{
// setup completions and validators
// FIXME
// FIXME rename
/*CollectionList *list = CollectionList::instance();
KLineEdit *edit = renameLineEdit();
......@@ -2260,7 +2258,7 @@ bool Playlist::editTag(PlaylistItem *item, const QString &text, int column)
void Playlist::slotInlineEditDone(QTreeWidgetItem *, const QString &, int column)
{
// FIXME
// FIXME rename
/*QString text = renameLineEdit()->text();
bool changed = false;
......
......@@ -41,6 +41,7 @@
#include <QTime>
#include <QApplication>
#include <QClipboard>
#include <QHeaderView>
#include "playlist.h"
#include "collectionlist.h"
......@@ -75,18 +76,20 @@ PlaylistBox::PlaylistBox(PlayerManager *player, QWidget *parent, QStackedWidget
{
readConfig();
setHeaderLabel("Playlists");
setRootIsDecorated(false);
setContextMenuPolicy(Qt::CustomContextMenu);
// FIXME
/*header()->blockSignals(true);
header()->blockSignals(true);
header()->hide();
header()->blockSignals(false);
setSorting(0);
setFullWidth(true);
setItemMargin(3);
sortByColumn(0);
// FIXME ?
//setFullWidth(true);
setAcceptDrops(true);
setSelectionModeExt(Extended);*/
// FIXME drag
//setAcceptDrops(true);
setSelectionMode(QAbstractItemView::ExtendedSelection);
m_contextMenu = new KMenu(this);
......@@ -141,9 +144,8 @@ 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)));*/
connect(this, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(slotShowContextMenu(QPoint)));
TagTransactionManager *tagManager = TagTransactionManager::instance();
connect(tagManager, SIGNAL(signalAboutToModifyTags()), SLOT(slotFreezePlaylists()));
......@@ -195,12 +197,11 @@ void PlaylistBox::raise(Playlist *playlist)
Item *i = m_playlistDict.value(playlist, 0);
if(i) {
// FIXME
clearSelection();
//setSelected(i, true);
setCurrentItem(i);
setSingleItem(i);
//ensureItemVisible(currentItem());
scrollToItem(currentItem());
}
else
PlaylistCollection::raise(playlist);
......@@ -380,7 +381,7 @@ void PlaylistBox::remove()
}
}
// FIXME
// FIXME removing items
/*if(items.back()->nextSibling() && static_cast<Item *>(items.back()->nextSibling())->playlist())
setSingleItem(items.back()->nextSibling());
else {
......@@ -490,7 +491,7 @@ void PlaylistBox::contentsDropEvent(QDropEvent *e)
{
m_showTimer->stop();
// FIXME
// FIXME drag
/*Item *i = static_cast<Item *>(itemAt(contentsToViewport(e->pos())));
decode(e->mimeData(), i);
......@@ -509,7 +510,7 @@ void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e)
//
// Otherwise, do not accept the event.
// FIXME
// FIXME drag
/*if (!KUrl::List::canDecode(e->mimeData())) {
e->setAccepted(false);
return;
......@@ -568,7 +569,7 @@ void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e)
void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e)
{
// FIXME
// FIXME drag
/*if(m_dropItem) {
Item *old = m_dropItem;
m_dropItem = 0;
......@@ -577,22 +578,20 @@ void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e)
QTreeWidget::contentsDragLeaveEvent(e);*/
}
void PlaylistBox::contentsMousePressEvent(QMouseEvent *e)
void PlaylistBox::mousePressEvent(QMouseEvent *e)
{
// FIXME
/*if(e->button() == Qt::LeftButton)
if(e->button() == Qt::LeftButton)
m_doingMultiSelect = true;
QTreeWidget::contentsMousePressEvent(e);*/
QTreeWidget::mousePressEvent(e);
}
void PlaylistBox::contentsMouseReleaseEvent(QMouseEvent *e)
void PlaylistBox::mouseReleaseEvent(QMouseEvent *e)
{
// FIXME
/*if(e->button() == Qt::LeftButton) {
if(e->button() == Qt::LeftButton) {
m_doingMultiSelect = false;
slotPlaylistChanged();
}
QTreeWidget::contentsMouseReleaseEvent(e);*/
QTreeWidget::mouseReleaseEvent(e);
}
void PlaylistBox::keyPressEvent(QKeyEvent *e)
......@@ -624,10 +623,9 @@ PlaylistBox::ItemList PlaylistBox::selectedBoxItems() const
void PlaylistBox::setSingleItem(QTreeWidgetItem *item)
{
// FIXME
/*setSelectionModeExt(Single);
K3ListView::setCurrentItem(item);
setSelectionModeExt(Extended);*/
setSelectionMode(QAbstractItemView::SingleSelection);
setCurrentItem(item);
setSelectionMode(QAbstractItemView::ExtendedSelection);
}
////////////////////////////////////////////////////////////////////////////////
......@@ -717,9 +715,9 @@ void PlaylistBox::slotDoubleClicked(QTreeWidgetItem *item)
action("stop")->trigger();
}
void PlaylistBox::slotShowContextMenu(QTreeWidgetItem *, const QPoint &point, int)
void PlaylistBox::slotShowContextMenu(const QPoint &point)
{
m_contextMenu->popup(point);
m_contextMenu->popup(mapToGlobal(point));
}
void PlaylistBox::slotPlaylistItemsDropped(Playlist *p)
......@@ -770,8 +768,7 @@ void PlaylistBox::slotLoadCachedPlaylists()
connect(m_savePlaylistTimer, SIGNAL(timeout()), SLOT(slotSavePlaylists()));
clearSelection();
// FIXME
//setSelected(m_playlistDict[CollectionList::instance()], true);
setCurrentItem(m_playlistDict[CollectionList::instance()]);
QTimer::singleShot(0, CollectionList::instance(), SLOT(slotCheckCache()));
QTimer::singleShot(0, object(), SLOT(slotScanFolders()));
......@@ -822,7 +819,7 @@ int PlaylistBox::Item::compare(QTreeWidgetItem *i, int col, bool) const
return text(col).toLower().localeAwareCompare(i->text(col).toLower());
}
// FIXME
// FIXME paintcell
/*void PlaylistBox::Item::paintCell(QPainter *painter, const QColorGroup &colorGroup, int column, int width, int align)
{
PlaylistBox *playlistBox = static_cast<PlaylistBox *>(listView());
......@@ -852,7 +849,7 @@ void PlaylistBox::Item::slotSetName(const QString &name)
treeWidget()->sortItems(0, Qt::AscendingOrder);
treeWidget()->scrollToItem(treeWidget()->currentItem());
//FIXME
//FIXME viewmode
//listView()->viewMode()->queueRefresh();
}
}
......
......@@ -95,8 +95,8 @@ private:
virtual void contentsDropEvent(QDropEvent *e);
virtual void contentsDragMoveEvent(QDragMoveEvent *e);
virtual void contentsDragLeaveEvent(QDragLeaveEvent *e);
virtual void contentsMousePressEvent(QMouseEvent *e);
virtual void contentsMouseReleaseEvent(QMouseEvent *e);
virtual void mousePressEvent(QMouseEvent *e);
virtual void mouseReleaseEvent(QMouseEvent *e);
virtual void keyPressEvent(QKeyEvent *e);
virtual void keyReleaseEvent(QKeyEvent *e);
......@@ -117,7 +117,7 @@ private slots:
*/
void slotPlaylistChanged();
void slotDoubleClicked(QTreeWidgetItem *);
void slotShowContextMenu(QTreeWidgetItem *, const QPoint &point, int);
void slotShowContextMenu(const QPoint &point);
void slotSetViewMode(int index);
void slotSavePlaylists();
void slotShowDropTarget();
......
......@@ -374,7 +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
// FIXME signal result
//DirectoryList::Result result = l.exec();
/*if(result.status == QDialog::Accepted) {
......@@ -458,7 +458,7 @@ void PlaylistCollection::editSearch()
if(!p)
return;
// FIXME
// FIXME signalResult
/*AdvancedSearchDialog::Result r =
AdvancedSearchDialog(p->name(), p->playlistSearch(), JuK::JuKInstance()).exec();
......@@ -531,7 +531,7 @@ void PlaylistCollection::createSearchPlaylist()
{
QString name = uniquePlaylistName(i18n("Search Playlist"));
// FIXME
// FIXME signal result
/*AdvancedSearchDialog::Result r =
AdvancedSearchDialog(name, PlaylistSearch(), JuK::JuKInstance()).exec();
......
......@@ -280,11 +280,11 @@ PlaylistItem::PlaylistItem(CollectionList *parent) :
{
d = new Data;
m_collectionItem = static_cast<CollectionListItem *>(this);
// FIXME
// FIXME drag
//setDragEnabled(true);
}
// FIXME
// FIXME paintCell
/*void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
{
if(!m_playingItems.contains(this))
......@@ -414,7 +414,7 @@ void PlaylistItem::setup(CollectionListItem *item)
d = item->d;
item->addChildItem(this);
// FIXME
// FIXME drag
//setDragEnabled(true);
}
......
......@@ -125,8 +125,7 @@ void PlaylistSplitter::slotFocusCurrentPlaylist()
if(playlist) {
playlist->setFocus();
// FIXME
//playlist->selectAll(false);
playlist->clearSelection();
// Select the top visible (and matching) item.
......@@ -138,14 +137,12 @@ 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->setSelectionMode(QTreeWidget::SingleSelection);
playlist->markItemSelected(item, true);
playlist->setCurrentItem(item);
// FIXME
//playlist->setSelectionMode(Q3ListView::Extended);
playlist->setSelectionMode(QTreeWidget::ExtendedSelection);
}
}
......@@ -265,9 +262,8 @@ 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);
m_playlistBox->setCurrentItem(m_playlistBox->topLevelItem(0));
}
void PlaylistSplitter::readConfig()
......
......@@ -465,7 +465,7 @@ void TagEditor::readCompletionMode(const KConfigGroup &config, KComboBox *box, c
KGlobalSettings::Completion mode =
KGlobalSettings::Completion(config.readEntry(key, (int)KGlobalSettings::CompletionAuto));
// FIXME
// FIXME tag completion
//box->setCompletionMode(mode);
}
......@@ -488,8 +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)));
connect(show, SIGNAL(toggled(bool)), this, SLOT(setVisible(bool)));
KAction *act = new KAction(KIcon(QLatin1String( "document-save")), i18n("&Save"), this);
ActionCollection::actions()->addAction("saveItem", act);
......@@ -502,15 +501,14 @@ void TagEditor::setupLayout()
setupUi(this);
foreach(QWidget *input, findChildren<QWidget *>()) {
// FIXME
/*if(input->inherits("QLineEdit") || input->inherits("QComboBox"))
if(input->inherits("QLineEdit") || input->inherits("QComboBox"))
connect(input, SIGNAL(textChanged(QString)), this, SLOT(slotDataChanged()));
if(input->inherits("QComboxBox"))
connect(input, SIGNAL(activated(int)), this, SLOT(slotDataChanged()));
if(input->inherits("QSpinBox"))
connect(input, SIGNAL(valueChanged(int)), this, SLOT(slotDataChanged()));
if(input->inherits("QTextEdit"))
connect(input, SIGNAL(textChanged()), this, SLOT(slotDataChanged()));*/
connect(input, SIGNAL(textChanged()), this, SLOT(slotDataChanged()));
}
// Do some meta-programming to find the matching enable boxes
......
......@@ -179,7 +179,7 @@ bool TagTransactionManager::processChangeList(bool undo)
item->file().setFile(tag->fileName());
item->refreshFromDisk();
// FIXME
//FIXME repaint
//item->repaint();
item->playlist()->dataChanged();
item->playlist()->update();
......
......@@ -146,7 +146,7 @@ void DefaultSequenceIterator::advance()
if(!next && loop) {
Playlist *p = current()->playlist();
next = p->firstChild();
// FIXME
// FIXME playlist iterator (nextSibling)
/*while(next && !next->isVisible())
next = static_cast<PlaylistItem *>(next->nextSibling());*/
}
......
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