<commit_before>import QtQuick 2.1
import QtQuick.Controls 1.1

/**
 * This is a workaround for lacking API in the QtQuick Controls MenuBar.
 * It replicates some of the functionality included in QtQuick Controls'
 * ApplicationWindow class to make the menu bar actually work.
 */
Rectangle {
    id: menuBackground;

    property QtObject window;
    Binding {
        target: menu.__contentItem;
        property: 'width';
        value: window.width;
        when: !menu.__isNative;
    }

    default property alias menus: menu.menus

    width: menu.__isNative ? 0 : menu.__contentItem.width
    height: menu.__isNative ? 0 : menu.__contentItem.height

    color: palette.window;

    Keys.forwardTo: menu.__contentItem;

    MenuBar {
        id: menu

        __parentWindow: menuBackground.window

        Component.onCompleted: {
            __contentItem.parent = menuBackground;
        }
    }

    SystemPalette { id: palette; colorGroup: SystemPalette.Active }
}<commit_msg>Removed line that gave qml error on startup<commit_after>import QtQuick 2.1
import QtQuick.Controls 1.1

/**
 * This is a workaround for lacking API in the QtQuick Controls MenuBar.
 * It replicates some of the functionality included in QtQuick Controls'
 * ApplicationWindow class to make the menu bar actually work.
 */
Rectangle {
    id: menuBackground;

    property QtObject window;
    Binding {
        target: menu.__contentItem;
        property: 'width';
        value: window.width;
        when: !menu.__isNative;
    }

    default property alias menus: menu.menus

    width: menu.__isNative ? 0 : menu.__contentItem.width
    height: menu.__isNative ? 0 : menu.__contentItem.height

    color: palette.window;

    Keys.forwardTo: menu.__contentItem;

    MenuBar {
        id: menu

        //__parentWindow: menuBackground.window

        Component.onCompleted: {
            __contentItem.parent = menuBackground;
        }
    }

    SystemPalette { id: palette; colorGroup: SystemPalette.Active }
}
{'fraction_non_alphanumeric': 0.07776669990029911, 'fraction_numerical': 0.005982053838484547, 'mean_word_length': 2.7444029850746268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4100198', 'n_tokens_mistral': 581, 'n_tokens_neox': 533, 'n_words': 171}