Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/src/iconmodel.cpp
| Show All 34 Lines | |||||
| 35 | #include <KConfigGroup> | 35 | #include <KConfigGroup> | ||
| 36 | #include <KIconLoader> | 36 | #include <KIconLoader> | ||
| 37 | #include <KIconTheme> | 37 | #include <KIconTheme> | ||
| 38 | #include <KSharedConfig> | 38 | #include <KSharedConfig> | ||
| 39 | #include <KPackage/PackageLoader> | 39 | #include <KPackage/PackageLoader> | ||
| 40 | 40 | | |||
| 41 | #include <Plasma/Theme> | 41 | #include <Plasma/Theme> | ||
| 42 | 42 | | |||
| 43 | #include <algorithm> | ||||
| 44 | #include <cstring> | ||||
| 43 | #include <iostream> | 45 | #include <iostream> | ||
| 44 | 46 | | |||
| 45 | using namespace CuttleFish; | 47 | using namespace CuttleFish; | ||
| 46 | 48 | | |||
| 47 | static QTextStream cout(stdout); | 49 | static QTextStream cout(stdout); | ||
| 48 | 50 | | |||
| 49 | IconModel::IconModel(QObject *parent) : | 51 | IconModel::IconModel(QObject *parent) : | ||
| 50 | QAbstractListModel(parent), | 52 | QAbstractListModel(parent), | ||
| ▲ Show 20 Lines • Show All 296 Lines • ▼ Show 20 Line(s) | 344 | while (it.hasNext()) { | |||
| 347 | } | 349 | } | ||
| 348 | } | 350 | } | ||
| 349 | } | 351 | } | ||
| 350 | } | 352 | } | ||
| 351 | } | 353 | } | ||
| 352 | 354 | | |||
| 353 | svgIcons(); | 355 | svgIcons(); | ||
| 354 | endResetModel(); | 356 | endResetModel(); | ||
| 355 | //qDebug() << "Loading took" << tt.elapsed() << " msec"; | 357 | | ||
| 358 | std::sort(m_icons.begin(), m_icons.end()); | ||||
| 359 | | ||||
| 356 | m_loading = false; | 360 | m_loading = false; | ||
| 357 | emit loadingChanged(); | 361 | emit loadingChanged(); | ||
| 358 | } | 362 | } | ||
| 359 | 363 | | |||
| 360 | bool IconModel::matchIcons(const QFileInfo& info) | 364 | bool IconModel::matchIcons(const QFileInfo& info) | ||
| 361 | { | 365 | { | ||
| 362 | bool ok = false; | 366 | bool ok = false; | ||
| 363 | 367 | | |||
| ▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines | |||||