|  | @@ -1414,6 +1414,8 @@ QScriptValue QSplitter_saveState(QScriptContext *context,
 | 
		
	
		
			
			| 1414 | 1414 |  									QScriptEngine *engine);
 | 
		
	
		
			
			| 1415 | 1415 |  QScriptValue QSplitter_restoreState(QScriptContext *context,
 | 
		
	
		
			
			| 1416 | 1416 |  									QScriptEngine *engine);
 | 
		
	
		
			
			|  | 1417 | +QScriptValue QSplitter_count(QScriptContext *context,
 | 
		
	
		
			
			|  | 1418 | +                             QScriptEngine *engine);
 | 
		
	
		
			
			| 1417 | 1419 |  void setQSplitterProperties(QScriptValue value, QScriptEngine *engine);
 | 
		
	
		
			
			| 1418 | 1420 |  
 | 
		
	
		
			
			| 1419 | 1421 |  @ Of these, the scripting engine must be informed of the constructor.
 | 
		
	
	
		
			
			|  | @@ -1440,6 +1442,7 @@ void setQSplitterProperties(QScriptValue value, QScriptEngine *engine)
 | 
		
	
		
			
			| 1440 | 1442 |  	value.setProperty("saveState", engine->newFunction(QSplitter_saveState));
 | 
		
	
		
			
			| 1441 | 1443 |  	value.setProperty("restoreState",
 | 
		
	
		
			
			| 1442 | 1444 |  	                  engine->newFunction(QSplitter_restoreState));
 | 
		
	
		
			
			|  | 1445 | +	value.setProperty("count", engine->newFunction(QSplitter_count));
 | 
		
	
		
			
			| 1443 | 1446 |  }
 | 
		
	
		
			
			| 1444 | 1447 |  
 | 
		
	
		
			
			| 1445 | 1448 |  @ The |"addWidget"| property is a simple wrapper around
 | 
		
	
	
		
			
			|  | @@ -1472,6 +1475,23 @@ QScriptValue QSplitter_addWidget(QScriptContext *context, QScriptEngine *)
 | 
		
	
		
			
			| 1472 | 1475 |  	return QScriptValue();
 | 
		
	
		
			
			| 1473 | 1476 |  }
 | 
		
	
		
			
			| 1474 | 1477 |  
 | 
		
	
		
			
			|  | 1478 | +@ The methods for saving and restoring the state of a splitter do not behave
 | 
		
	
		
			
			|  | 1479 | +well when the number of widgets contained in the splitter increase. This is a
 | 
		
	
		
			
			|  | 1480 | +problem in the logging view where we may want to allow zero width indicators
 | 
		
	
		
			
			|  | 1481 | +but reconfiguration can cause the number of indicators to increase. This would
 | 
		
	
		
			
			|  | 1482 | +result in the right most indicators such as the batch timer disappearing. Most
 | 
		
	
		
			
			|  | 1483 | +people do not notice the splitter handle or think to drag that to the left to
 | 
		
	
		
			
			|  | 1484 | +correct this issue so it would be better to save the number of indicators when
 | 
		
	
		
			
			|  | 1485 | +saving the state and if the number of indicators does not match, we should not
 | 
		
	
		
			
			|  | 1486 | +restore the obsolete saved state.
 | 
		
	
		
			
			|  | 1487 | +
 | 
		
	
		
			
			|  | 1488 | +@<Functions for scripting@>=
 | 
		
	
		
			
			|  | 1489 | +QScriptValue QSplitter_count(QScriptContext *context, QScriptEngine *)
 | 
		
	
		
			
			|  | 1490 | +{
 | 
		
	
		
			
			|  | 1491 | +	QSplitter *self = getself<QSplitter *>(context);
 | 
		
	
		
			
			|  | 1492 | +	return QScriptValue(self->count());
 | 
		
	
		
			
			|  | 1493 | +}
 | 
		
	
		
			
			|  | 1494 | +
 | 
		
	
		
			
			| 1475 | 1495 |  @ When saving and restoring the state of a splitter, we always want to do this
 | 
		
	
		
			
			| 1476 | 1496 |  through a |QSettings| object. For this, we take an extra argument specifying the
 | 
		
	
		
			
			| 1477 | 1497 |  settings key to read from or write to. Unlike the equivalent functions called
 |