Bug Tracker Incident #7971

 


Summary
Project
INCDT - xTuple ERP
Incident Category
Bugs
Incident Number
7971
Visibility
public


Product Version
None
Fixed In Version
3.2.0RC


Summary
Idle Shutdown displays wrong number of seconds.


Description

The Idle Shutdown screen incorrectly displays the number of seconds left until closing.

The Display looks like:

Shutdown in 60 seconds.
.
5960 seconds.
.
5860 seconds.

This is caused by there being two QLabel widgets named "_count" in the idleShutdown.ui file.

UIC helpfully renames the second instance "_count1" when creating ui_idleShutdown.h, but this is the instance that should be updated by the timer event.

Following the conventions elsewhere in the codebase, the attached patch renames the first instance of the QLabel to be "_countLit".


Details
Reporter
petebisson
CRM Account
xTincident Default Account
Status
Closed
Assigned
cryan


Priority
Normal
Severity
Patch
Updated
09-06-12 15:39
Resolution
Fixed



Comments

DateUsernameComment
03/04/11 08:25mfgadmin

Additional Info:

Note:
This change may also need to cascade through the translation system.

I am not familiar with localization in QT, so I am leaving this line of enquiry as an exercise for the reader ...

03/04/11 08:25mfgadmin

The Idle Shutdown screen incorrectly displays the number of seconds left until closing.

The Display looks like:

Shutdown in 60 seconds.
.
5960 seconds.
.
5860 seconds.

This is caused by there being two QLabel widgets named "_count" in the idleShutdown.ui file.

UIC helpfully renames the second instance "_count1" when creating ui_idleShutdown.h, but this is the instance that should be updated by the timer event.

Following the conventions elsewhere in the codebase, the attached patch renames the first instance of the QLabel to be "_countLit".

12/23/08 16:15mmcbride

verified fixed in version 320rc

12/10/08 10:24cryan

Combined the 3 labels into a single label using the %1 for the seconds.

12/10/08 09:38svn

Revision: 4475
http://postbooks.svn.sourceforge.net/postbooks/?rev=4475&view=rev
Author: cryan
Date: 2008-12-10 14:38:14 +0000 (Wed, 10 Dec 2008)

Log Message:
-----------
Fixed idleShutdown screen to not show number of seconds twice and make it easier to translate. Issue #7971.

Modified Paths:
--------------
xtuple/trunk/guiclient/idleShutdown.cpp
xtuple/trunk/guiclient/idleShutdown.h
xtuple/trunk/guiclient/idleShutdown.ui

12/09/08 19:04petebisson

Hmm.

Half a fix - I did not spot that there were no spaces between the output of the three QLabels.

I am resisting the urge to simply add whitespace into idleShutdown.ui either side of the _count label, but the display does need spacing.

Suggestions please - is there a best practice way of doing this without upsetting the translators too much?

My first thoughts are go for the easy fix:

change _count->setText(QString::number(_secsRemaining));
to _count->setText(QString(" %1 ").arg(_secsRemaining));

But is it "better" to combine the 3 QLabels (_countLit, _count, _secondsLit) into one QLabel and use

QString("Shutdown in %1 seconds.").arg(_secsRemaining);

Or should this be backtracked even further and some property (such as Qt::AlignHCenter) be set in the UI?

If someone can suggest the best approach, I will add the appropriate patch to this bug.

Thanks for the free training ;-)



Characteristics

Operating System
 
Doc Flag
False
Copyright Assigned
Yes

Files

Filename
idleShutdown._countLit.patch


Related Documents

TypeNumberDescriptionRelationshipRemove
Incident3920Customer # not auto-capitalizedRelated tox
ProjectXTUPLEAPPSPorted From Mantisx


Subscribers

You do not have permission to view subscribers.


Incident History

DateUsernameFieldChange
12/16/10 09:13acdrupalNewIncident Added