Skip to content

Commit 3e388b5

Browse files
author
mhugent
committed
Remove legacy code in composer label
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11351 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 68cd1a8 commit 3e388b5

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/core/composer/qgscomposerlabel.cpp

-23
Original file line numberDiff line numberDiff line change
@@ -61,29 +61,6 @@ void QgsComposerLabel::paint( QPainter* painter, const QStyleOptionGraphicsItem*
6161
void QgsComposerLabel::setText( const QString& text )
6262
{
6363
mText = text;
64-
65-
#if 0
66-
//replace '$CURRENT_DATE<(FORMAT)>' with the current date
67-
//e.g. $CURRENT_DATE(d 'June' yyyy)
68-
mText = text;
69-
int currentDatePos = mText.indexOf( "$CURRENT_DATE" );
70-
if ( currentDatePos != -1 )
71-
{
72-
//check if there is a bracket just after $CURRENT_DATE
73-
QString formatText;
74-
int openingBracketPos = mText.indexOf( "(", currentDatePos );
75-
int closingBracketPos = mText.indexOf( ")", openingBracketPos + 1 );
76-
if ( openingBracketPos != -1 && closingBracketPos != -1 && ( closingBracketPos - openingBracketPos ) > 1 )
77-
{
78-
formatText = mText.mid( openingBracketPos + 1, closingBracketPos - openingBracketPos - 1 );
79-
mText.replace( currentDatePos, closingBracketPos - currentDatePos + 1, QDate::currentDate().toString( formatText ) );
80-
}
81-
else //no bracket
82-
{
83-
mText.replace( "$CURRENT_DATE", QDate::currentDate().toString() );
84-
}
85-
}
86-
#endif //0
8764
}
8865

8966
QString QgsComposerLabel::displayText() const

0 commit comments

Comments
 (0)