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 ab6ff108 authored by Scott Wheeler's avatar Scott Wheeler

CollectionList compiles now.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=513882
parent 805b37aa
......@@ -39,7 +39,7 @@
#include <Q3CString>
#include <QDropEvent>
using namespace ActionCollection;
using ActionCollection::action;
////////////////////////////////////////////////////////////////////////////////
// static methods
......@@ -74,12 +74,12 @@ void CollectionList::initialize(PlaylistCollection *collection)
// it here, and perform the sort.
KConfigGroup config(KGlobal::config(), "Playlists");
SortOrder order = Descending;
if(config.readBoolEntry("CollectionListSortAscending", true))
order = Ascending;
Qt::SortOrder order = Qt::DescendingOrder;
if(config.readEntry("CollectionListSortAscending", true))
order = Qt::AscendingOrder;
m_list->setSortOrder(order);
m_list->setSortColumn(config.readNumEntry("CollectionListSortColumn", 1));
m_list->setSortColumn(config.readEntry("CollectionListSortColumn", 1));
m_list->sort();
......@@ -149,7 +149,7 @@ void CollectionList::slotNewItems(const KFileItemList &items)
{
QStringList files;
for(KFileItemListIterator it(items); it.current(); ++it)
for(KFileItemList::ConstIterator it = items.begin(); it != items.end(); ++it)
files.append((*it)->url().path());
addFiles(files);
......@@ -158,7 +158,7 @@ void CollectionList::slotNewItems(const KFileItemList &items)
void CollectionList::slotRefreshItems(const KFileItemList &items)
{
for(KFileItemListIterator it(items); it.current(); ++it) {
for(KFileItemList::ConstIterator it = items.begin(); it != items.end(); ++it) {
CollectionListItem *item = lookup((*it)->url().path());
if(item) {
......@@ -233,9 +233,8 @@ CollectionList::CollectionList(PlaylistCollection *collection) :
m_itemsDict(5003),
m_columnTags(15, 0)
{
new KAction(i18n("Show Playing"), KShortcut(), actions(), "showPlaying");
connect(action("showPlaying"), SIGNAL(activated()), this, SLOT(slotShowPlaying()));
new KAction(i18n("Show Playing"), KShortcut(), this, SLOT(slotShowPlaying()),
ActionCollection::actions(), "showPlaying");
connect(action<KToolBarPopupAction>("back")->popupMenu(), SIGNAL(aboutToShow()),
this, SLOT(slotPopulateBackMenu()));
......@@ -259,7 +258,7 @@ CollectionList::~CollectionList()
{
KConfigGroup config(KGlobal::config(), "Playlists");
config.writeEntry("CollectionListSortColumn", sortColumn());
config.writeEntry("CollectionListSortAscending", sortOrder() == Ascending);
config.writeEntry("CollectionListSortAscending", sortOrder() == Qt::AscendingOrder);
// The CollectionListItems will try to remove themselves from the
// m_columnTags member, so we must make sure they're gone before we
......@@ -286,7 +285,7 @@ void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e)
e->accept(false);
}
QString CollectionList::addStringToDict(const QString &value, unsigned column)
QString CollectionList::addStringToDict(const QString &value, int column)
{
if(column > m_columnTags.count() || value.stripWhiteSpace().isEmpty())
return QString::null;
......@@ -324,7 +323,7 @@ QStringList CollectionList::uniqueSet(UniqueSetType t) const
return QStringList();
}
if((unsigned) column >= m_columnTags.count())
if(column >= m_columnTags.count())
return QStringList();
TagCountDictIterator it(*m_columnTags[column]);
......@@ -336,7 +335,7 @@ QStringList CollectionList::uniqueSet(UniqueSetType t) const
return list;
}
void CollectionList::removeStringFromDict(const QString &value, unsigned column)
void CollectionList::removeStringFromDict(const QString &value, int column)
{
if(column > m_columnTags.count() || value.isEmpty())
return;
......
......@@ -124,8 +124,8 @@ protected:
// These methods are also used by CollectionListItem, to manage the
// strings used in generating the unique sets and tree view mode playlists.
QString addStringToDict(const QString &value, unsigned column);
void removeStringFromDict(const QString &value, unsigned column);
QString addStringToDict(const QString &value, int column);
void removeStringFromDict(const QString &value, int column);
void addWatched(const QString &file) { m_dirWatch->addFile(file); }
void removeWatched(const QString &file) { m_dirWatch->removeFile(file); }
......
......@@ -199,7 +199,7 @@ void CoverInfo::popup() const
{
QPixmap image = pixmap(FullSize);
QPoint mouse = QCursor::pos();
QRect desktop = KApplication::desktop()->screenGeometry(mouse);
QRect desktop = QApplication::desktop()->screenGeometry(mouse);
int x = mouse.x();
int y = mouse.y();
......
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