Commit 4e13f805 authored by Michael Pyne's avatar Michael Pyne

Fix miscellaneous remaining warnings.

Most are just worked around in some fashion but better to weed out
warnings from features that don't work right now so that actual issues
that might be introduced are that much more apparent.
parent b9bd44b9
......@@ -427,7 +427,7 @@ void JuK::readConfig()
ActionCollection::action<QAction>("albumRandomPlay")->setChecked(true);
bool loopPlaylist = playerConfig.readEntry("LoopPlaylist", false);
//ActionCollection::action<QAction>("loopPlaylist")->setChecked(loopPlaylist);
ActionCollection::action<QAction>("loopPlaylist")->setChecked(loopPlaylist);
// general settings
......
......@@ -99,55 +99,6 @@ static bool manualResize()
* A tooltip specialized to show full filenames over the file name column.
*/
#ifdef __GNUC__
#warning disabling the tooltip for now
#endif
#if 0
class PlaylistToolTip : public QToolTip
{
public:
PlaylistToolTip(QWidget *parent, Playlist *playlist) :
QToolTip(parent), m_playlist(playlist) {}
virtual void maybeTip(const QPoint &p)
{
PlaylistItem *item = static_cast<PlaylistItem *>(m_playlist->itemAt(p));
if(!item)
return;
QPoint contentsPosition = m_playlist->viewportToContents(p);
int column = m_playlist->header()->sectionAt(contentsPosition.x());
if(column == m_playlist->columnOffset() + PlaylistItem::FileNameColumn ||
item->cachedWidths()[column] > m_playlist->columnWidth(column) ||
(column == m_playlist->columnOffset() + PlaylistItem::CoverColumn &&
item->file().coverInfo()->hasCover()))
{
QRect r = m_playlist->itemRect(item);
int headerPosition = m_playlist->header()->sectionPos(column);
r.setLeft(headerPosition);
r.setRight(headerPosition + m_playlist->header()->sectionSize(column));
if(column == m_playlist->columnOffset() + PlaylistItem::FileNameColumn)
tip(r, item->file().absFilePath());
else if(column == m_playlist->columnOffset() + PlaylistItem::CoverColumn) {
Q3MimeSourceFactory *f = Q3MimeSourceFactory::defaultFactory();
f->setImage("coverThumb",
QImage(item->file().coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage()));
tip(r, "<center><img source=\"coverThumb\"/></center>");
}
else
tip(r, item->text(column));
}
}
private:
Playlist *m_playlist;
};
#endif
////////////////////////////////////////////////////////////////////////////////
// Playlist::SharedSettings definition
////////////////////////////////////////////////////////////////////////////////
......@@ -1100,8 +1051,13 @@ QMimeData* Playlist::mimeData(const QList<QTreeWidgetItem *> items) const
bool Playlist::dropMimeData(QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action)
{
qCDebug(JUK_LOG) << index;
return true;
// TODO: Re-add DND
Q_UNUSED(parent);
Q_UNUSED(index);
Q_UNUSED(data);
Q_UNUSED(action);
return false;
}
void Playlist::dropEvent(QDropEvent *e)
......@@ -1472,11 +1428,6 @@ void Playlist::slotInitialize()
// setup header RMB menu
//////////////////////////////////////////////////
#ifdef __GNUC__
#warning should be fixed...
#endif
/* m_headerMenu->insertTitle(i18n("Show")); */
QAction *showAction;
for(int i = 0; i < header()->count(); ++i) {
......@@ -1525,10 +1476,6 @@ void Playlist::slotInitialize()
setDragEnabled(true);
m_disableColumnWidthUpdates = false;
// FIXME tooltips
//setShowToolTips(false);
/* m_toolTip = new PlaylistToolTip(viewport(), this); */
}
void Playlist::setupItem(PlaylistItem *item)
......@@ -1704,9 +1651,7 @@ void Playlist::setPlaying(PlaylistItem *item, bool addToHistory)
}
TrackSequenceManager::instance()->setCurrent(item);
#ifdef __GNUC__
#warning "kde4^H^H^H^Hkde5: port it"
#endif
// TODO is this replaced by MPRIS2?
//kapp->dcopClient()->emitDCOPSignal("Player", "trackChanged()", data);
if(!item)
......@@ -2193,7 +2138,7 @@ bool Playlist::editTag(PlaylistItem *item, const QString &text, int column)
return true;
}
void Playlist::slotInlineEditDone(QTreeWidgetItem *, const QString &, int column)
void Playlist::slotInlineEditDone(QTreeWidgetItem *, const QString &, int)
{
// FIXME rename
/*QString text = renameLineEdit()->text();
......
......@@ -461,11 +461,10 @@ void TagEditor::readConfig()
void TagEditor::readCompletionMode(const KConfigGroup &config, KComboBox *box, const QString &key)
{
KGlobalSettings::Completion mode =
KGlobalSettings::Completion(config.readEntry(key, (int)KGlobalSettings::CompletionAuto));
KCompletion::CompletionMode mode =
KCompletion::CompletionMode(config.readEntry(key, (int)KCompletion::CompletionAuto));
// FIXME tag completion
//box->setCompletionMode(mode);
box->setCompletionMode(mode);
}
void TagEditor::saveConfig()
......
......@@ -179,6 +179,7 @@ void ViewMode::updateIcons(int size)
void ViewMode::setupItem(PlaylistBox::Item *item) const
{
Q_UNUSED(item);
// FIXME
/*const PlaylistBox *box = item->listView();
const int width = box->width() - box->verticalScrollBar()->width() - border * 2;
......@@ -236,6 +237,8 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item,
QStringList l;
Q_UNUSED(fm);
while(!line.isEmpty()) {
int textLength = line.length();
// FIXME
......
......@@ -111,7 +111,7 @@ public:
const QColorGroup &colorGroup,
int column, int width, int align);*/
virtual void setupItem(PlaylistBox::Item *item) const { /*item->QTreeWidgetItem::setup();*/ }
virtual void setupItem(PlaylistBox::Item *) const { /*item->QTreeWidgetItem::setup();*/ }
protected:
virtual void updateHeights();
};
......
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