Changeset 9247


Ignore:
Timestamp:
Oct 6, 2009, 12:27:26 AM (12 years ago)
Author:
charles
Message:

(trunk qt) minor cleanup

Location:
trunk/qt
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/app.cc

    r9245 r9247  
    1717#include <QDialogButtonBox>
    1818#include <QIcon>
     19#include <QLabel>
    1920#include <QLibraryInfo>
    20 #include <QLabel>
    2121#include <QRect>
    2222#include <QTranslator>
  • trunk/qt/details.cc

    r9179 r9247  
    1717#include <QCheckBox>
    1818#include <QComboBox>
    19 #include <QEvent>
    20 #include <QHeaderView>
    21 #include <QResizeEvent>
     19#include <QDateTime>
    2220#include <QDialogButtonBox>
    2321#include <QDoubleSpinBox>
     22#include <QEvent>
    2423#include <QFont>
    2524#include <QFontMetrics>
    2625#include <QHBoxLayout>
    27 #include <QVBoxLayout>
     26#include <QHBoxLayout>
     27#include <QHeaderView>
    2828#include <QLabel>
    2929#include <QLocale>
    3030#include <QPushButton>
     31#include <QRadioButton>
     32#include <QResizeEvent>
    3133#include <QSpinBox>
    32 #include <QRadioButton>
    3334#include <QStyle>
    3435#include <QTabWidget>
     36#include <QTextBrowser>
    3537#include <QTreeView>
    36 #include <QTextBrowser>
    37 #include <QDateTime>
    3838#include <QTreeWidget>
    3939#include <QTreeWidgetItem>
    4040#include <QVBoxLayout>
    41 #include <QHBoxLayout>
    4241
    4342#include <libtransmission/transmission.h>
  • trunk/qt/file-tree.cc

    r9033 r9247  
    1515
    1616#include <QApplication>
     17#include <QHeaderView>
    1718#include <QPainter>
    1819#include <QResizeEvent>
    19 #include <QHeaderView>
    2020#include <QStringList>
    2121
  • trunk/qt/mainwin.cc

    r9243 r9247  
    1818#include <QDesktopServices>
    1919#include <QFileDialog>
     20#include <QHBoxLayout>
    2021#include <QLabel>
     22#include <QSignalMapper>
    2123#include <QSize>
    2224#include <QStyle>
    23 #include <QHBoxLayout>
    2425#include <QSystemTrayIcon>
    2526#include <QUrl>
    26 #include <QSignalMapper>
    2727
    2828#include <libtransmission/version.h>
  • trunk/qt/make-dialog.cc

    r9243 r9247  
    131131    top->addWidget(( myNewLabel = new QLabel));
    132132    top->addWidget(( myNewProgress = new QProgressBar ));
    133     QDialogButtonBox * buttons = new QDialogButtonBox( dialog );
    134     buttons->setStandardButtons( QDialogButtonBox::Ok
    135                                | QDialogButtonBox::Open
    136                                | QDialogButtonBox::Abort );
     133    QDialogButtonBox * buttons = new QDialogButtonBox( QDialogButtonBox::Ok
     134                                                     | QDialogButtonBox::Open
     135                                                     | QDialogButtonBox::Abort );
    137136    myNewButtonBox = buttons;
    138137    connect( buttons, SIGNAL(clicked(QAbstractButton*)),
     
    384383    top->addWidget( hig, 1 );
    385384
    386     myButtonBox = new QDialogButtonBox( this );
    387     myButtonBox->setStandardButtons( QDialogButtonBox::Ok
    388                                | QDialogButtonBox::Close );
     385    myButtonBox = new QDialogButtonBox( QDialogButtonBox::Ok
     386                                      | QDialogButtonBox::Close );
    389387    connect( myButtonBox, SIGNAL(clicked(QAbstractButton*)),
    390388             this, SLOT(onButtonBoxClicked(QAbstractButton*)) );
  • trunk/qt/options.cc

    r8570 r9247  
    1414#include <iostream>
    1515
     16#include <QCheckBox>
     17#include <QDialogButtonBox>
    1618#include <QEvent>
    17 #include <QResizeEvent>
    1819#include <QFileDialog>
     20#include <QFileIconProvider>
     21#include <QFileInfo>
    1922#include <QGridLayout>
    2023#include <QLabel>
    21 #include <QCheckBox>
    22 #include <QFileInfo>
    23 #include <QDialogButtonBox>
    2424#include <QPushButton>
    25 #include <QLabel>
     25#include <QResizeEvent>
    2626#include <QSet>
     27#include <QVBoxLayout>
    2728#include <QWidget>
    28 #include <QVBoxLayout>
    2929
    3030#include <libtransmission/transmission.h>
     
    3636#include "options.h"
    3737#include "prefs.h"
    38 #include "qticonloader.h"
    3938#include "session.h"
    4039#include "torrent.h"
     
    8079    if( session.isLocal( ) )
    8180    {
    82         const QIcon folderIcon = QtIconLoader :: icon( "folder", style()->standardIcon( QStyle::SP_DirIcon ) );
     81        const QFileIconProvider iconProvider;
     82        const QIcon folderIcon = iconProvider.icon( QFileIconProvider::Folder );
    8383        const QPixmap folderPixmap = folderIcon.pixmap( iconSize );
    8484
  • trunk/qt/prefs-dialog.cc

    r8763 r9247  
    1414#include <iostream>
    1515
     16#include <QCheckBox>
     17#include <QComboBox>
    1618#include <QCoreApplication>
    17 #include <QCheckBox>
    18 #include <QFileDialog>
    19 #include <QComboBox>
    2019#include <QDialogButtonBox>
    2120#include <QDoubleSpinBox>
     21#include <QFileDialog>
     22#include <QFileIconProvider>
     23#include <QFileInfo>
    2224#include <QHBoxLayout>
     25#include <QHttp>
     26#include <QIcon>
    2327#include <QLabel>
    2428#include <QLineEdit>
    25 #include <QFileInfo>
    2629#include <QList>
     30#include <QMessageBox>
    2731#include <QPushButton>
    28 #include <QIcon>
    2932#include <QSpinBox>
    3033#include <QStyle>
     
    3437#include <QTimer>
    3538#include <QVBoxLayout>
    36 #include <QHttp>
    37 #include <QMessageBox>
    3839
    3940#include "hig.h"
     
    525526{
    526527    const int iconSize( style( )->pixelMetric( QStyle :: PM_SmallIconSize ) );
    527     const QIcon folderIcon = QtIconLoader :: icon( "folder", style()->standardIcon( QStyle::SP_DirIcon ) );
     528    const QFileIconProvider iconProvider;
     529    const QIcon folderIcon = iconProvider.icon( QFileIconProvider::Folder );
    528530    const QPixmap folderPixmap = folderIcon.pixmap( iconSize );
    529531
  • trunk/qt/relocate.cc

    r8570 r9247  
    1111 */
    1212
     13#include <QApplication>
     14#include <QDialogButtonBox>
     15#include <QDir>
     16#include <QFileDialog>
     17#include <QFileIconProvider>
    1318#include <QLabel>
    1419#include <QPushButton>
     20#include <QRadioButton>
     21#include <QSet>
     22#include <QStyle>
    1523#include <QVBoxLayout>
    16 #include <QRadioButton>
    17 #include <QDir>
    18 #include <QFileDialog>
    19 #include <QSet>
    20 #include <QDialogButtonBox>
    2124#include <QWidget>
    22 #include <QApplication>
    23 #include <QStyle>
    2425
    2526#include "hig.h"
    2627#include "relocate.h"
    2728#include "session.h"
    28 #include "qticonloader.h"
    2929
    3030QString RelocateDialog :: myPath;
     
    6868{
    6969    const int iconSize( style( )->pixelMetric( QStyle :: PM_SmallIconSize ) );
    70     const QIcon folderIcon = QtIconLoader :: icon( "folder", style()->standardIcon( QStyle::SP_DirIcon ) );
     70    const QFileIconProvider iconProvider;
     71    const QIcon folderIcon = iconProvider.icon( QFileIconProvider::Folder );
    7172    const QPixmap folderPixmap = folderIcon.pixmap( iconSize );
    7273
  • trunk/qt/torrent-delegate-min.cc

    r8570 r9247  
    2828#include "torrent-model.h"
    2929#include "utils.h"
    30 #include "qticonloader.h"
    3130
    3231enum
  • trunk/qt/torrent-delegate.cc

    r8570 r9247  
    2828#include "torrent-model.h"
    2929#include "utils.h"
    30 #include "qticonloader.h"
    3130
    3231enum
  • trunk/qt/torrent.cc

    r9179 r9247  
    1515
    1616#include <QApplication>
    17 #include <QStyle>
     17#include <QFileIconProvider>
     18#include <QFileInfo>
    1819#include <QSet>
    1920#include <QString>
    20 #include <QFileInfo>
     21#include <QStyle>
    2122#include <QVariant>
    2223
     
    2728#include "app.h"
    2829#include "prefs.h"
    29 #include "qticonloader.h"
    3030#include "torrent.h"
    3131#include "utils.h"
     
    414414
    415415    if( files.size( ) > 1 )
    416         icon = QtIconLoader :: icon( "folder", QApplication::style()->standardIcon( QStyle::SP_DirIcon ) );
     416        icon = QFileIconProvider().icon( QFileIconProvider::Folder );
    417417    else
    418418        icon = Utils :: guessMimeIcon( files.at(0).filename );
  • trunk/qt/watchdir.cc

    r8570 r9247  
    1414
    1515#include <QDir>
     16#include <QFileSystemWatcher>
    1617#include <QTimer>
    17 #include <QFileSystemWatcher>
    1818
    1919#include <libtransmission/transmission.h>
Note: See TracChangeset for help on using the changeset viewer.