On Tue, Apr 29, 2008 at 03:44:09PM -0000, [EMAIL PROTECTED] wrote:
> +     QString abs() const
> +     {
> +             return abs_;
> +     }
> +     /// Add the first segment from the postfix or three dots to the prefix.
> +     /// Merge multiple dot tripples. In fact dots are added lazily, i.e. 
> only
> +     /// when really needed.
> +     void shiftPathSegment(bool dotted)
> +     {
> +             if (postfix_.count() > 0) {

Could be an early return.

> +                     if (!dotted) {
> +                             if (dottedPrefix_ && !prefix_.isEmpty())
> +                                     prefix_ += ".../";
> +                             prefix_ += postfix_.front() + "/";
> +                     }
> +                     dottedPrefix_ = dotted && !prefix_.isEmpty();
> +                     postfix_.pop_front();
> +             }
> +     }
> +     ///
> +     QString displayString() const
> +     {
> +             if (prefix_.isEmpty())
> +                     return filename_;
> +             else {

No need for 'else' after a return. 

> +                     
> +                     // still the same segment?
> +                     QString nextString;
> +                     if ((next != paths.end()
> +                          && (nextString = next->displayString()) == 
> segString))

Why the double paratheses?

> +                     // we found a non-atomic segment segStart <= sit <= it 
> < next.
> +                     // Shift path segments and hope for the best
> +                     // that it makes the path more unique.
> +                     somethingChanged = true;
> +                     It sit = segStart;
> +                     QString dspString = sit->forecastDisplayString();
> +                     LYXERR(Debug::GUI, "first forecast found for "
> +                            << fromqstr(sit->abs())
> +                            << " => " << fromqstr(dspString));

I think we can drom the 'fromqstr' here after #include "qt_helpers.h".
[That's a recent addition...]

> 
> Modified: lyx-devel/trunk/src/support/FileName.h
> URL: 
> http://www.lyx.org/trac/file/lyx-devel/trunk/src/support/FileName.h?rev=24555
> ==============================================================================
> --- lyx-devel/trunk/src/support/FileName.h (original)
> +++ lyx-devel/trunk/src/support/FileName.h Tue Apr 29 17:44:07 2008
> @@ -162,6 +162,8 @@
>  
>       /// filename without path
>       std::string onlyFileName() const;
> +        /// filename without path and without extension
> +        std::string onlyFileNameWithoutExt() const;

s/<spaces>/<tab>

Andre'

Reply via email to