@ -42,6 +42,16 @@ Item {
/ / ( l a u n c h e r U r l , i n d e x )
property variant separators: [ ]
Connections {
target: root
onTasksCountChanged: {
firstRealTaskIndex = firstRealTask ( ) ;
lastRealTaskIndex = lastRealTask ( ) ;
root . separatorsUpdated ( ) ;
}
}
/ / ! t h i s i s u s e d i n o r d e r t o u p d a t e t h e i n d e x w h e n t h e s i g n a l i s f o r a p p l e t s
/ / ! o u t s i d e t h e l a t t e p l a s m o i d
function updateIdSendScale ( index , zScale , zStep ) {
@ -285,8 +295,13 @@ Item {
function separatorArrayPos ( launcher ) {
var res = - 1 ;
var sLength = separators . length ;
for ( var i = 0 ; i < sLength ; ++ i ) {
/ / ! s a f e t y c h e c k e r
if ( i >= separators . length )
return false ;
for ( var i = 0 ; i < separators . length ; ++ i ) {
if ( separators [ i ] . launcherUrl === launcher )
return i ;
}
@ -317,7 +332,13 @@ Item {
}
function taskIsSeparator ( taskIndex ) {
for ( var i = 0 ; i < separators . length ; ++ i ) {
var sLength = separators . length ;
for ( var i = 0 ; i < sLength ; ++ i ) {
/ / ! s a f e t y c h e c k e r
if ( i >= separators . length )
return false ;
if ( separators [ i ] . index === taskIndex )
return true ;
}
@ -329,7 +350,13 @@ Item {
if ( ! isSeparator ( separator ) )
return false ;
for ( var i = 0 ; i < separators . length ; ++ i ) {
var sLength = separators . length ;
for ( var i = 0 ; i < sLength ; ++ i ) {
/ / ! s a f e t y c h e c k e r
if ( i >= separators . length )
return false ;
if ( separators [ i ] . launcherUrl . indexOf ( separator ) >= 0 )
return true ;
}
@ -436,7 +463,13 @@ Item {
var max = - 1 ;
var arrayPos = - 1 ;
for ( var i = 0 ; i < separators . length ; ++ i ) {
var sLength = separators . length ;
for ( var i = 0 ; i < sLength ; ++ i ) {
/ / ! s a f e t y c h e c k e r
if ( i >= separators . length )
return false ;
if ( separators [ i ] . index > max ) {
max = separators [ i ] . index ;
arrayPos = i ;