Removed debugging output

wilder-5.14
Ivan Čukić 10 years ago
parent 060681d694
commit ce5d187f43
  1. 12
      libtaskmanager/launchertasksmodel.cpp
  2. 2
      libtaskmanager/launchertasksmodel_p.h
  3. 8
      libtaskmanager/tasksmodel.cpp

@ -126,7 +126,6 @@ LauncherTasksModel::~LauncherTasksModel()
QVariant LauncherTasksModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || index.row() >= d->launchersOrder.count()) {
qDebug() << "GREPME NOT A VALID INDEX" << index.row();
return QVariant();
}
@ -202,10 +201,6 @@ void LauncherTasksModel::setLauncherList(const QStringList &serializedLaunchers)
QList<QUrl> newLaunchersOrder;
QHash<QUrl, QStringList> newActivitiesForLauncher;
qDebug() << "GREPME: We are asked to set these launchers:"
<< serializedLaunchers
;
// Loading the activity to launchers map
QHash<QString, QList<QUrl>> launchersForActivitiesCandidates;
for (const auto& serializedLauncher: serializedLaunchers) {
@ -215,13 +210,9 @@ void LauncherTasksModel::setLauncherList(const QStringList &serializedLaunchers)
std::tie(url, activities) =
deserializeLauncher(serializedLauncher);
qDebug() << "GREPME: Result: " << url << activities;
// Is url is not valid, ignore it
if (!url.isValid()) continue;
qDebug() << "GREPME: Url is valid";
// Is the url a duplicate?
const auto location =
std::find_if(newLaunchersOrder.begin(), newLaunchersOrder.end(),
@ -249,9 +240,6 @@ void LauncherTasksModel::setLauncherList(const QStringList &serializedLaunchers)
}
}
qDebug() << "GREPME: We got:" << newActivitiesForLauncher;
qDebug() << "GREPME: We got order:" << newLaunchersOrder;
if (newActivitiesForLauncher != d->activitiesForLauncher) {
// Common case optimization: If the list changed but its size
// did not (e.g. due to reordering by a user of this model),

@ -41,7 +41,6 @@ inline static std::pair<QUrl, QStringList> deserializeLauncher(const QString &se
// to not have the activities array -- to have the old format
if (serializedLauncher.startsWith('[')) {
// It seems we have the activity specifier in the launcher
qDebug() << "GREPME: It seems we have the activity specifier in the launcher";
const auto activitiesBlockEnd = serializedLauncher.indexOf("]\n");
if (activitiesBlockEnd != -1) {
@ -56,7 +55,6 @@ inline static std::pair<QUrl, QStringList> deserializeLauncher(const QString &se
// If the activities array is empty, this means that this launcher
// needs to be on all activities
if (activities.isEmpty()) {
qDebug() << "GREPME: We need to have this in all activities";
activities = QStringList({ NULL_UUID });
}

@ -1439,7 +1439,6 @@ void TasksModel::syncLaunchers()
QMap<int, QString> sortedShownLaunchers;
qDebug() << "GREPME This is the list" << launcherList();
foreach(const QString &launcherUrlStr, launcherList()) {
int row = -1;
QStringList activities;
@ -1447,16 +1446,10 @@ void TasksModel::syncLaunchers()
std::tie(launcherUrl, activities) = deserializeLauncher(launcherUrlStr);
qDebug() << "GREPME: ASFDFDF: " << launcherUrl << activities;
for (int i = 0; i < d->launcherTasksModel->rowCount(); ++i) {
const QUrl &rowLauncherUrl =
d->launcherTasksModel->index(i, 0).data(AbstractTasksModel::LauncherUrlWithoutIcon).toUrl();
qDebug()
<< "GREPME Do these match?" << launcherUrl << rowLauncherUrl
<< launcherUrlsMatch(launcherUrl, rowLauncherUrl, IgnoreQueryItems);
if (launcherUrlsMatch(launcherUrl, rowLauncherUrl, IgnoreQueryItems)) {
row = i;
break;
@ -1464,7 +1457,6 @@ void TasksModel::syncLaunchers()
}
if (row != -1) {
qDebug() << "GREPME inserting" << row << launcherUrlStr;
sortedShownLaunchers.insert(row, launcherUrlStr);
}
}

Loading…
Cancel
Save