Commit d317831d authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Revert "Qt, recents: elipse on the left the mrl"

This reverts commit 7e1526b9.
parent 3ae42e74
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <QSettings> #include <QSettings>
#include <QRegExp> #include <QRegExp>
#include <QSignalMapper> #include <QSignalMapper>
#include <QFontMetrics>
#ifdef WIN32 #ifdef WIN32
#include <shlobj.h> #include <shlobj.h>
...@@ -43,7 +42,7 @@ ...@@ -43,7 +42,7 @@
SHARD_APPIDINFOIDLIST = 0x00000005, SHARD_APPIDINFOIDLIST = 0x00000005,
SHARD_LINK = 0x00000006, SHARD_LINK = 0x00000006,
SHARD_APPIDINFOLINK = 0x00000007, SHARD_APPIDINFOLINK = 0x00000007,
SHARD_SHELLITEM = 0x00000008 SHARD_SHELLITEM = 0x00000008
} SHARD; */ } SHARD; */
#define SHARD_PATHW 0x00000003 #define SHARD_PATHW 0x00000003
#endif #endif
...@@ -91,9 +90,8 @@ void RecentsMRL::addRecent( const QString &mrl ) ...@@ -91,9 +90,8 @@ void RecentsMRL::addRecent( const QString &mrl )
/* Add to the Windows 7 default list in taskbar */ /* Add to the Windows 7 default list in taskbar */
SHAddToRecentDocs( SHARD_PATHW, qtu( mrl ) ); SHAddToRecentDocs( SHARD_PATHW, qtu( mrl ) );
#endif #endif
QString mrl2 = QApplication::fontMetrics().elidedText( mrl, Qt::ElideLeft, 400 );
int i_index = stack->indexOf( mrl2 ); int i_index = stack->indexOf( mrl );
if( 0 <= i_index ) if( 0 <= i_index )
{ {
/* move to the front */ /* move to the front */
...@@ -101,7 +99,7 @@ void RecentsMRL::addRecent( const QString &mrl ) ...@@ -101,7 +99,7 @@ void RecentsMRL::addRecent( const QString &mrl )
} }
else else
{ {
stack->prepend( mrl2 ); stack->prepend( mrl );
if( stack->size() > RECENTS_LIST_SIZE ) if( stack->size() > RECENTS_LIST_SIZE )
stack->takeLast(); stack->takeLast();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment