Changeset 33778 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 4, 2010 3:25:25 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.cpp
r29008 r33778 28 28 #include <QEventLoop> 29 29 #include <QApplication> 30 #include <QFileIconProvider>31 30 #include <QDir> 32 31 #include <QUrl> … … 186 185 /* Create some nice looking menu out of the other 187 186 * directory parts. */ 188 QFileIconProvider fip;189 187 QDir dir (fi.absolutePath()); 190 188 do … … 194 192 else 195 193 action = menu.addAction (dir.dirName()); 196 action->setIcon ( fip.icon(QFileInfo (dir, "")));194 action->setIcon (vboxGlobal().icon(QFileInfo (dir, ""))); 197 195 } 198 196 while (dir.cdUp()); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r33712 r33778 33 33 #include <QProcess> 34 34 #include <QHash> 35 #include <QFileIconProvider> 35 36 36 37 #ifdef Q_WS_X11 … … 518 519 } 519 520 521 QIcon icon(QFileIconProvider::IconType type) { return m_globalIconProvider.icon(type); } 522 QIcon icon(const QFileInfo &info) { return m_globalIconProvider.icon(info); } 523 520 524 QPixmap warningIcon() const { return mWarningIcon; } 521 525 QPixmap errorIcon() const { return mErrorIcon; } … … 840 844 QPixmap mWarningIcon, mErrorIcon; 841 845 846 QFileIconProvider m_globalIconProvider; 847 842 848 friend VBoxGlobal &vboxGlobal(); 843 849 }; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxFilePathSelectorWidget.cpp
r33540 r33778 24 24 #include "UIIconPool.h" 25 25 #include "VBoxFilePathSelectorWidget.h" 26 #include "VBoxGlobal.h" 26 27 27 28 /* Global includes */ … … 31 32 #include <QClipboard> 32 33 #include <QDir> 33 #include <QFileIconProvider>34 34 #include <QFocusEvent> 35 35 #include <QHBoxLayout> … … 66 66 VBoxFilePathSelectorWidget::VBoxFilePathSelectorWidget (QWidget *aParent) 67 67 : QIWithRetranslateUI<QComboBox> (aParent) 68 , mIconProvider (new QFileIconProvider())69 68 , mCopyAction (new QAction (this)) 70 69 , mMode (Mode_Folder) … … 107 106 VBoxFilePathSelectorWidget::~VBoxFilePathSelectorWidget() 108 107 { 109 delete mIconProvider;110 108 } 111 109 … … 415 413 { 416 414 if (mMode == Mode_Folder) 417 return mIconProvider->icon(QFileIconProvider::Folder);415 return vboxGlobal().icon(QFileIconProvider::Folder); 418 416 else 419 return mIconProvider->icon(QFileIconProvider::File);417 return vboxGlobal().icon(QFileIconProvider::File); 420 418 } 421 419 … … 550 548 /* Attach corresponding icon */ 551 549 setItemIcon (PathId, QFileInfo (mPath).exists() ? 552 mIconProvider->icon(QFileInfo (mPath)) :550 vboxGlobal().icon(QFileInfo (mPath)) : 553 551 defaultIcon()); 554 552 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxFilePathSelectorWidget.h
r28800 r33778 32 32 /* Qt forward declarations */ 33 33 class QHBoxLayout; 34 class QFileIconProvider;35 34 class QAction; 36 35 class QPushButton; … … 111 110 112 111 /* Private member vars */ 113 QFileIconProvider *mIconProvider;114 112 QAction *mCopyAction; 115 113 Mode mMode;
Note:
See TracChangeset
for help on using the changeset viewer.