mirror of
git://slackware.nl/current.git
synced 2025-01-10 05:25:51 +01:00
d0ac7419a9
ap/cups-filters-1.22.2-x86_64-1.txz: Upgraded. kde/calligra-2.9.11-x86_64-28.txz: Rebuilt. Patched to fix Calligra Plan crash. Thanks to Olek. l/adwaita-icon-theme-3.32.0-noarch-1.txz: Upgraded. l/giflib-5.1.8-x86_64-1.txz: Upgraded. l/libssh2-1.8.1-x86_64-1.txz: Upgraded. Fixed several security issues. For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3855 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3856 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3857 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3858 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3859 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3860 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3861 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3862 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-3863 (* Security fix *) x/scim-1.4.18-x86_64-1.txz: Upgraded. xap/mozilla-firefox-60.6.0esr-x86_64-1.txz: Upgraded. This is a bugfix release. For more information, see: https://www.mozilla.org/en-US/firefox/60.6.0/releasenotes/
138 lines
6.2 KiB
Diff
138 lines
6.2 KiB
Diff
From 4d9762cd151b7d6a208aece8cebcdbe09bd41703 Mon Sep 17 00:00:00 2001
|
|
From: Dag Andersen <danders@get2net.dk>
|
|
Date: Mon, 22 Aug 2016 09:15:32 +0200
|
|
Subject: [PATCH 66/80] Backport: Plan: Do not crash if scheduler plugins not
|
|
found
|
|
|
|
Shouldn't happen atm, but...
|
|
---
|
|
plan/libs/models/kptschedulemodel.cpp | 69 ++++++++++++++++++++++-------------
|
|
1 file changed, 43 insertions(+), 26 deletions(-)
|
|
|
|
diff --git a/plan/libs/models/kptschedulemodel.cpp b/plan/libs/models/kptschedulemodel.cpp
|
|
index 35b74bc..e3ce298 100644
|
|
--- a/plan/libs/models/kptschedulemodel.cpp
|
|
+++ b/plan/libs/models/kptschedulemodel.cpp
|
|
@@ -252,9 +252,16 @@ Qt::ItemFlags ScheduleItemModel::flags( const QModelIndex &index ) const
|
|
if ( !m_readWrite ) {
|
|
return flags &= ~Qt::ItemIsEditable;
|
|
}
|
|
- flags &= ~Qt::ItemIsEditable;
|
|
ScheduleManager *sm = manager( index );
|
|
- int capabilities = sm->schedulerPlugin()->capabilities();
|
|
+ if ( sm == 0 ) {
|
|
+ return flags;
|
|
+ }
|
|
+ SchedulerPlugin *pl = sm->schedulerPlugin();
|
|
+ if ( pl == 0 ) {
|
|
+ return flags;
|
|
+ }
|
|
+ int capabilities = pl->capabilities();
|
|
+ flags &= ~Qt::ItemIsEditable;
|
|
if ( sm && ! sm->isBaselined() ) {
|
|
switch ( index.column() ) {
|
|
case ScheduleModel::ScheduleState: break;
|
|
@@ -452,7 +459,11 @@ QVariant ScheduleItemModel::allowOverbooking( const QModelIndex &index, int role
|
|
if ( sm == 0 ) {
|
|
return QVariant();
|
|
}
|
|
- int capabilities = sm->schedulerPlugin()->capabilities();
|
|
+ SchedulerPlugin *pl = sm->schedulerPlugin();
|
|
+ if ( pl == 0 ) {
|
|
+ return QVariant();
|
|
+ }
|
|
+ int capabilities = pl->capabilities();
|
|
switch ( role ) {
|
|
case Qt::EditRole:
|
|
return sm->allowOverbooking();
|
|
@@ -480,11 +491,11 @@ QVariant ScheduleItemModel::allowOverbooking( const QModelIndex &index, int role
|
|
if ( capabilities & SchedulerPlugin::AllowOverbooking ) {
|
|
return sm->allowOverbooking()
|
|
? i18nc( "@info:tooltip", "Allow overbooking of resources" )
|
|
- : i18nc( "@info:tooltip 1=scheduler name", "%1 always allows overbooking of resources", sm->schedulerPlugin()->name() );
|
|
+ : i18nc( "@info:tooltip 1=scheduler name", "%1 always allows overbooking of resources", pl->name() );
|
|
}
|
|
if ( capabilities & SchedulerPlugin::AvoidOverbooking ) {
|
|
return sm->allowOverbooking()
|
|
- ? i18nc( "@info:tooltip 1=scheduler name", "%1 always avoids overbooking of resources", sm->schedulerPlugin()->name() )
|
|
+ ? i18nc( "@info:tooltip 1=scheduler name", "%1 always avoids overbooking of resources", pl->name() )
|
|
: i18nc( "@info:tooltip", "Avoid overbooking resources" );
|
|
}
|
|
break;
|
|
@@ -637,7 +648,11 @@ QVariant ScheduleItemModel::schedulingDirection( const QModelIndex &index, int r
|
|
if ( sm == 0 ) {
|
|
return QVariant();
|
|
}
|
|
- int capabilities = sm->schedulerPlugin()->capabilities();
|
|
+ SchedulerPlugin *pl = sm->schedulerPlugin();
|
|
+ if ( pl == 0 ) {
|
|
+ return QVariant();
|
|
+ }
|
|
+ int capabilities = pl->capabilities();
|
|
switch ( role ) {
|
|
case Qt::EditRole:
|
|
return sm->schedulingDirection();
|
|
@@ -664,13 +679,13 @@ QVariant ScheduleItemModel::schedulingDirection( const QModelIndex &index, int r
|
|
}
|
|
if ( capabilities & SchedulerPlugin::ScheduleForward ) {
|
|
return sm->schedulingDirection()
|
|
- ? i18nc( "@info:tooltip 1=scheduler name", "%1 always schedules from target start time", sm->schedulerPlugin()->name() )
|
|
+ ? i18nc( "@info:tooltip 1=scheduler name", "%1 always schedules from target start time", pl->name() )
|
|
: i18nc( "@info:tooltip", "Schedule project from target start time" );
|
|
}
|
|
if ( capabilities & SchedulerPlugin::ScheduleBackward ) {
|
|
return sm->schedulingDirection()
|
|
? i18nc( "@info:tooltip", "Schedule project from target end time" )
|
|
- : i18nc( "@info:tooltip 1=scheduler name", "%1 always schedules from target end time", sm->schedulerPlugin()->name() );
|
|
+ : i18nc( "@info:tooltip 1=scheduler name", "%1 always schedules from target end time", pl->name() );
|
|
}
|
|
break;
|
|
case Role::EnumList:
|
|
@@ -708,24 +723,26 @@ QVariant ScheduleItemModel::scheduler( const QModelIndex &index, int role ) cons
|
|
return QVariant();
|
|
}
|
|
SchedulerPlugin *pl = sm->schedulerPlugin();
|
|
- switch ( role ) {
|
|
- case Qt::EditRole:
|
|
- return sm->schedulerPluginId();
|
|
- case Qt::DisplayRole:
|
|
- return pl ? pl->name() : i18n( "Unknown" );
|
|
- case Qt::ToolTipRole:
|
|
- return pl ? pl->comment() : QString();
|
|
- case Role::EnumList:
|
|
- return sm->schedulerPluginNames();
|
|
- case Role::EnumListValue:
|
|
- return sm->schedulerPluginIndex();
|
|
- case Qt::TextAlignmentRole:
|
|
- return Qt::AlignCenter;
|
|
- case Qt::StatusTipRole:
|
|
- return QVariant();
|
|
- case Qt::WhatsThisRole: {
|
|
- QString s = pl->description();
|
|
- return s.isEmpty() ? QVariant() : QVariant( s );
|
|
+ if ( pl ) {
|
|
+ switch ( role ) {
|
|
+ case Qt::EditRole:
|
|
+ return sm->schedulerPluginId();
|
|
+ case Qt::DisplayRole:
|
|
+ return pl ? pl->name() : i18n( "Unknown" );
|
|
+ case Qt::ToolTipRole:
|
|
+ return pl ? pl->comment() : QString();
|
|
+ case Role::EnumList:
|
|
+ return sm->schedulerPluginNames();
|
|
+ case Role::EnumListValue:
|
|
+ return sm->schedulerPluginIndex();
|
|
+ case Qt::TextAlignmentRole:
|
|
+ return Qt::AlignCenter;
|
|
+ case Qt::StatusTipRole:
|
|
+ return QVariant();
|
|
+ case Qt::WhatsThisRole: {
|
|
+ QString s = pl->description();
|
|
+ return s.isEmpty() ? QVariant() : QVariant( s );
|
|
+ }
|
|
}
|
|
}
|
|
return QVariant();
|
|
--
|
|
2.7.4
|
|
|