VirtualBox

Changeset 43328 in vbox


Ignore:
Timestamp:
Sep 14, 2012 12:39:54 PM (12 years ago)
Author:
vboxsync
Message:

Translate previous to Hungarian.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/VBoxDbgConsole.cpp

    r43324 r43328  
    183183    Assert(m_hGUIThread == RTThreadNativeSelf());
    184184
    185     QString command = currentText();
     185    QString strCommand = currentText();
    186186    /* TODO: trim whitespace? */
    187     if (command.isEmpty()) {
     187    if (strCommand.isEmpty())
    188188        return;
    189     }
    190189
    191190    /* deal with the current command. */
    192     emit commandSubmitted(command);
     191    emit commandSubmitted(strCommand);
    193192
    194193
     
    196195     * Add current command to history.
    197196     */
    198     bool needsAppending = true;
     197    bool fNeedsAppending = true;
    199198
    200199    /* invariant: empty line at the end */
    201     int lastItem = count() - 1;
    202     Assert(itemText(lastItem).isEmpty());
     200    int iLastItem = count() - 1;
     201    Assert(itemText(iLastItem).isEmpty());
    203202
    204203    /* have previous command? check duplicate. */
    205     if (lastItem > 0) {
    206         const QString prevCommand(itemText(lastItem - 1));
    207         if (command == prevCommand) {
    208             needsAppending = false;
     204    if (iLastItem > 0)
     205    {
     206        const QString strPrevCommand(itemText(iLastItem - 1));
     207        if (strCommand == strPrevCommand)
     208            fNeedsAppending = false;
     209    }
     210
     211    if (fNeedsAppending)
     212    {
     213        /* history full? drop the oldest command. */
     214        if (count() == maxCount())
     215        {
     216            removeItem(0);
     217            --iLastItem;
    209218        }
    210     }
    211 
    212     if (needsAppending) {
    213         /* history full? drop the oldest command. */
    214         if (count() == maxCount()) {
    215             removeItem(0);
    216             --lastItem;
    217         }
    218219
    219220        /* insert before the empty line. */
    220         insertItem(lastItem, command);
     221        insertItem(iLastItem, strCommand);
    221222    }
    222223
    223224    /* invariant: empty line at the end */
    224     int newLastItem = count() - 1;
    225     Assert(itemText(newLastItem).isEmpty());
     225    int iNewLastItem = count() - 1;
     226    Assert(itemText(iNewLastItem).isEmpty());
    226227
    227228    /* select empty line to present "new" command line to the user */
    228     setCurrentIndex(newLastItem);
     229    setCurrentIndex(iNewLastItem);
    229230}
    230231
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