[Amarok] Prepare for having seperate default layouts for 32

Seb Ruiz ruiz at kde.org
Mon Aug 31 23:41:00 CEST 2009


2009/9/1 Nikolaj Hald Nielsen <nhnFreespirit at gmail.com>:
> commit a0c2e51420669cb765731f1165e2822cf54e45bf
> Author:     Nikolaj Hald Nielsen <nhnFreespirit at gmail.com>
> AuthorDate: Mon Aug 31 20:46:23 2009 +0200
> Commit:     Nikolaj Hald Nielsen <nhnFreespirit at gmail.com>
> CommitDate: Mon Aug 31 20:47:15 2009 +0200
>
>    Prepare for having seperate default layouts for 32 and 64 bit systems.

For those of unaware, why do we need different layouts here? Are 64
bit users the cool kids?

>
> diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
> index 7f18868..c49a791 100644
> --- a/src/MainWindow.cpp
> +++ b/src/MainWindow.cpp
> @@ -61,14 +61,6 @@
>  #include "widgets/Splitter.h"
>  //#include "mediabrowser.h"
>
> -#include <QCheckBox>
> -#include <QDesktopServices>
> -#include <QDesktopWidget>
> -#include <QDockWidget>
> -#include <QList>
> -#include <QSizeGrip>
> -#include <QVBoxLayout>
> -
>  #include <KAction>          //m_actionCollection
>  #include <KActionCollection>
>  #include <KApplication>     //kapp
> @@ -86,6 +78,15 @@
>
>  #include <plasma/plasma.h>
>
> +#include <QCheckBox>
> +#include <QDesktopServices>
> +#include <QDesktopWidget>
> +#include <QDockWidget>
> +#include <QList>
> +#include <QSizeGrip>
> +#include <QSysInfo>
> +#include <QVBoxLayout>
> +
>  #ifdef Q_WS_X11
>  #include <fixx11h.h>
>  #endif
> @@ -1110,7 +1111,12 @@ void MainWindow::restoreLayout()
>     {
>
>         const KUrl url( KStandardDirs::locate( "data", "amarok/data/" ) );
> -        QFile defaultFile( url.path() + "DefaultDockLayout" );
> +
> +        QString defaultLayoutFile = "DefaultDockLayout32";
> +        if( QSysInfo::WordSize == 64 )
> +            defaultLayoutFile = "DefaultDockLayout64";
> +
> +        QFile defaultFile( url.path() + defaultLayoutFile );
>
>         if ( defaultFile.open( QIODevice::ReadOnly ) )
>         {
>
>
>



-- 
Seb Ruiz

http://www.sebruiz.net/
http://amarok.kde.org/


More information about the Amarok-devel mailing list