VirtualBox

Changeset 12217 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 8, 2008 11:37:21 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: Only return true for isModified if it really is modified (bug #2064).

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFilePathSelectorWidget.h

    r11845 r12217  
    7676    void copyToClipboard();
    7777    void refreshText();
     78    void setPathInternal (const QString &aText);
    7879
    7980private:
     
    9495    bool mIsEditableMode;
    9596    bool mIsMouseAwaited;
     97
     98    bool mModified;
    9699};
    97100
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFilePathSelectorWidget.cpp

    r12013 r12217  
    6464    , mIsEditableMode (false)
    6565    , mIsMouseAwaited (false)
     66    , mModified (false)
    6667{
    6768    /* Populate items */
     
    8889    /* Setup connections */
    8990    connect (lineEdit(), SIGNAL (textEdited (const QString &)),
    90              this, SLOT (setPath (const QString &)));
     91             this, SLOT (setPathInternal (const QString &)));
    9192    connect (this, SIGNAL (activated (int)), this, SLOT (onActivated (int)));
    9293    connect (mCopyAction, SIGNAL (triggered (bool)), this, SLOT (copyToClipboard()));
     
    133134bool VBoxFilePathSelectorWidget::isModified() const
    134135{
    135     return true;
     136    return mModified;
    136137}
    137138
     
    272273        case ResetId:
    273274        {
    274             setPath (QString::null);
     275            setPathInternal (QString::null);
    275276            break;
    276277        }
     
    307308
    308309    path.remove (QRegExp ("[\\\\/]$"));
    309     setPath (path);
     310    setPathInternal (path);
    310311}
    311312
     
    459460}
    460461
     462void VBoxFilePathSelectorWidget::setPathInternal (const QString &aText)
     463{
     464    QString oldPath = mPath;
     465    setPath (aText);
     466    if (mPath != oldPath)
     467        mModified = true;
     468}
     469
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