VirtualBox

Ignore:
Timestamp:
Jul 6, 2023 1:28:02 PM (20 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158150
Message:

FE/Qt: bugref:9080. bugref:6699. Some refactoring.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.cpp

    r100409 r100410  
    216216    {
    217217        path.prepend(pParent->fileObjectName());
    218 
    219218        pParent = pParent->parentItem();
    220219    }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICustomFileSystemModel.h

    r100408 r100410  
    176176signals:
    177177
    178     void sigItemRenamed(UICustomFileSystemItem *pItem, QString strOldPath, QString strOldName, QString strNewName);
     178    void sigItemRenamed(UICustomFileSystemItem *pItem, const QString &strOldPath,
     179                        const QString &strOldName, const QString &strNewName);
    179180
    180181public:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp

    r100408 r100410  
    664664}
    665665
    666 bool UIFileManagerGuestTable::renameItem(UICustomFileSystemItem *item, QString strOldPath)
     666bool UIFileManagerGuestTable::renameItem(UICustomFileSystemItem *item, const QString &strOldPath)
    667667{
    668668    if (!item || item->isUpDirectory())
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.h

    r100408 r100410  
    8585    virtual void    deleteByPath(const QStringList &pathList) override final;
    8686    virtual void    goToHomeDirectory() override final;
    87     virtual bool    renameItem(UICustomFileSystemItem *item, QString strOldPath) override final;
     87    virtual bool    renameItem(UICustomFileSystemItem *item, const QString &strOldPath) override final;
    8888    virtual bool    createDirectory(const QString &path, const QString &directoryName) override final;
    8989    virtual QString fsObjectPropertyString() override final;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.cpp

    r100408 r100410  
    325325}
    326326
    327 bool UIFileManagerHostTable::renameItem(UICustomFileSystemItem *item, QString strOldPath)
     327bool UIFileManagerHostTable::renameItem(UICustomFileSystemItem *item, const QString &strOldPath)
    328328{
    329329    if (!item || item->isUpDirectory())
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerHostTable.h

    r100408 r100410  
    6565    virtual void    deleteByPath(const QStringList &pathList) override final;
    6666    virtual void    goToHomeDirectory() override final;
    67     virtual bool    renameItem(UICustomFileSystemItem *item, QString strOldPath) override final;
     67    virtual bool    renameItem(UICustomFileSystemItem *item, const QString &strOldPath) override final;
    6868    virtual bool    createDirectory(const QString &path, const QString &directoryName) override final;
    6969    virtual QString fsObjectPropertyString() override final;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp

    r100408 r100410  
    893893}
    894894
    895 void UIFileManagerTable::sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldPath,
    896                                                     QString strOldName, QString strNewName)
     895void UIFileManagerTable::sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, const QString &strOldPath,
     896                                                    const QString &strOldName, const QString &strNewName)
    897897{
    898898    Q_UNUSED(strNewName);
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.h

    r100408 r100410  
    214214    virtual void     deleteByPath(const QStringList &pathList) = 0;
    215215    virtual void     goToHomeDirectory() = 0;
    216     virtual bool     renameItem(UICustomFileSystemItem *item, QString strOldPath) = 0;
     216    virtual bool     renameItem(UICustomFileSystemItem *item, const QString &strOldPath) = 0;
    217217    virtual bool     createDirectory(const QString &path, const QString &directoryName) = 0;
    218218    virtual QString  fsObjectPropertyString() = 0;
     
    279279     *  if the file system rename fails we restore the old name of the item. See the comment of
    280280     *  sltRename() for more details. Note that when this slot is called item->path() has also changed. Thus strOldPath. */
    281     void sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldPath, QString strOldName, QString strNewName);
     281    void sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, const QString &strOldPath,
     282                                    const QString &strOldName, const QString &strNewName);
    282283    void sltHandleNavigationWidgetPathChange(const QString& strPath);
    283284    void sltHandleNavigationWidgetHistoryListChanged();
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp

    r100408 r100410  
    924924}
    925925
    926 void UIVisoContentBrowser::sltItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldPath, QString strOldName, QString strNewName)
     926void UIVisoContentBrowser::sltItemRenameAttempt(UICustomFileSystemItem *pItem, const QString &strOldPath,
     927                                                const QString &strOldName, const QString &strNewName)
    927928{
    928929    Q_UNUSED(strOldPath);
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h

    r100408 r100410  
    8686    /** Handles the signal we get from the model during setData call. Restores the old name of the file object
    8787     *  to @p strOldName if need be (if rename fails for some reason). */
    88     void sltItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldPath, QString strOldName, QString strNewName);
     88    void sltItemRenameAttempt(UICustomFileSystemItem *pItem, const QString &strOldPath,
     89                              const QString &strOldName, const QString &strNewName);
    8990    void sltRemoveItems();
    9091    void sltResetAction();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette