Content-Length: 5884 {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":318427,"clientInfo":{"name":"Visual Studio Code","version":"1.95.3"},"locale":"en","rootPath":"/home/orkun/qt_work/qt_projects/calqlatr","rootUri":"file:///home/orkun/qt_work/qt_projects/calqlatr","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"configuration":true,"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]},"resolveSupport":{"properties":["location.range"]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"didChangeConfiguration":{"dynamicRegistration":true},"foldingRange":{"refreshSupport":true},"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true},"inlineValue":{"refreshSupport":true},"inlayHint":{"refreshSupport":true},"diagnostics":{"refreshSupport":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]},"labelDetailsSupport":true},"insertTextMode":2,"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"completionList":{"itemDefaults":["commitCharacters","editRange","insertTextFormat","insertTextMode","data"]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":true},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true,"rangesSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true,"foldingRangeKind":{"valueSet":["comment","imports","region"]},"foldingRange":{"collapsedText":false}},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator","decorator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false,"serverCancelSupport":true,"augmentsSyntaxTokens":true},"linkedEditingRange":{"dynamicRegistration":true},"typeHierarchy":{"dynamicRegistration":true},"inlineValue":{"dynamicRegistration":true},"inlayHint":{"dynamicRegistration":true,"resolveSupport":{"properties":["tooltip","textEdits","label.tooltip","label.location","label.command"]}},"diagnostic":{"dynamicRegistration":true,"relatedDocumentSupport":false}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"staleRequestSupport":{"cancel":true,"retryOnContentModified":["textDocument/semanticTokens/full","textDocument/semanticTokens/range","textDocument/semanticTokens/full/delta"]},"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0"},"positionEncodings":["utf-16"]},"notebookDocument":{"synchronization":{"dynamicRegistration":true,"executionSummarySupport":true}}},"trace":"off","workspaceFolders":[{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr","name":"calqlatr"}]}}Content-Length: 52 {"jsonrpc":"2.0","method":"initialized","params":{}}Content-Length: 5406 {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml","languageId":"qml","version":1,"text":"// Copyright (C) 2023 The Qt Company Ltd.\r\n// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause\r\n\r\nimport QtQuick\r\nimport QtQuick.Window\r\nimport QtQuick.Layouts\r\nimport \"content\"\r\nimport \"content/calculator.js\" as CalcEngine\r\n\r\nWindow {\r\n visible: true\r\n width: 320\r\n height: 480\r\n minimumWidth: Math.max(numberPad.portraitModeWidth, display.minWidth) + root.margin * 2\r\n minimumHeight: display.minHeight + numberPad.height + root.margin * 3\r\n color: root.backgroundColor\r\n\r\n Item {\r\n id: root\r\n anchors.fill: parent\r\n\r\n readonly property int margin: 18\r\n readonly property color backgroundColor: \"#983333\"\r\n readonly property int minLandscapeModeWidth: numberPad.landscapeModeWidth + display.minWidth + margin * 3\r\n property bool isPortraitMode: width < minLandscapeModeWidth\r\n\r\n onIsPortraitModeChanged: {\r\n if (isPortraitMode) {\r\n portraitMode.visible = true;\r\n landscapeMode.visible = false;\r\n } else {\r\n portraitMode.visible = false;\r\n landscapeMode.visible = true;\r\n }\r\n }\r\n\r\n Display {\r\n id: display\r\n readonly property int minWidth: 210\r\n readonly property int minHeight: 60\r\n\r\n Layout.minimumWidth: minWidth\r\n Layout.fillWidth: true\r\n Layout.fillHeight: true\r\n Layout.margins: root.margin\r\n\r\n // remove the margin on the side that the numberPad is on, to prevent a double margin\r\n Layout.bottomMargin: root.isPortraitMode ? 0 : root.margin\r\n Layout.rightMargin: root.isPortraitMode ? root.margin : 0\r\n }\r\n\r\n NumberPad {\r\n id: numberPad\r\n Layout.margins: root.margin\r\n }\r\n\r\n // define the responsive layouts\r\n ColumnLayout {\r\n id: portraitMode\r\n anchors.fill: parent\r\n visible: true\r\n\r\n LayoutItemProxy {\r\n target: display\r\n Layout.minimumHeight: display.minHeight\r\n }\r\n LayoutItemProxy {\r\n target: numberPad\r\n Layout.alignment: Qt.AlignHCenter\r\n }\r\n }\r\n\r\n RowLayout {\r\n id: landscapeMode\r\n anchors.fill: parent\r\n visible: false\r\n\r\n LayoutItemProxy {\r\n target: display\r\n }\r\n LayoutItemProxy {\r\n target: numberPad\r\n Layout.alignment: Qt.AlignVCenter\r\n }\r\n }\r\n\r\n function operatorPressed(operator) {\r\n CalcEngine.operatorPressed(operator, display);\r\n }\r\n function digitPressed(digit) {\r\n CalcEngine.digitPressed(digit, display);\r\n }\r\n function isButtonDisabled(op) {\r\n return CalcEngine.isOperationDisabled(op, display);\r\n }\r\n\r\n Keys.onPressed: function (event) {\r\n switch (event.key) {\r\n case Qt.Key_0:\r\n digitPressed(\"0\");\r\n break;\r\n case Qt.Key_1:\r\n digitPressed(\"1\");\r\n break;\r\n case Qt.Key_2:\r\n digitPressed(\"2\");\r\n break;\r\n case Qt.Key_3:\r\n digitPressed(\"3\");\r\n break;\r\n case Qt.Key_4:\r\n digitPressed(\"4\");\r\n break;\r\n case Qt.Key_5:\r\n digitPressed(\"5\");\r\n break;\r\n case Qt.Key_6:\r\n digitPressed(\"6\");\r\n break;\r\n case Qt.Key_7:\r\n digitPressed(\"7\");\r\n break;\r\n case Qt.Key_8:\r\n digitPressed(\"8\");\r\n break;\r\n case Qt.Key_9:\r\n digitPressed(\"9\");\r\n break;\r\n case Qt.Key_E:\r\n digitPressed(\"e\");\r\n break;\r\n case Qt.Key_P:\r\n digitPressed(\"π\");\r\n break;\r\n case Qt.Key_Plus:\r\n operatorPressed(\"+\");\r\n break;\r\n case Qt.Key_Minus:\r\n operatorPressed(\"-\");\r\n break;\r\n case Qt.Key_Asterisk:\r\n operatorPressed(\"×\");\r\n break;\r\n case Qt.Key_Slash:\r\n operatorPressed(\"÷\");\r\n break;\r\n case Qt.Key_Enter:\r\n case Qt.Key_Return:\r\n operatorPressed(\"=\");\r\n break;\r\n case Qt.Key_Comma:\r\n case Qt.Key_Period:\r\n digitPressed(\".\");\r\n break;\r\n case Qt.Key_Backspace:\r\n operatorPressed(\"bs\");\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n"}}}Content-Length: 275 {"jsonrpc":"2.0","id":1,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"},"range":{"start":{"line":32,"character":45},"end":{"line":32,"character":45}},"context":{"diagnostics":[],"triggerKind":2}}}Content-Length: 205 {"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"Request client/registerCapability failed with message: No feature implementation for workspace.didChangeWatchedFiles found. Registration failed."}}Content-Length: 275 {"jsonrpc":"2.0","id":2,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"},"range":{"start":{"line":32,"character":45},"end":{"line":32,"character":45}},"context":{"diagnostics":[],"triggerKind":2}}}Content-Length: 238 {"jsonrpc":"2.0","id":3,"method":"textDocument/semanticTokens/range","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"},"range":{"start":{"line":0,"character":0},"end":{"line":90,"character":52}}}}Content-Length: 156 {"jsonrpc":"2.0","id":4,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"}}}Content-Length: 275 {"jsonrpc":"2.0","id":5,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"},"range":{"start":{"line":32,"character":45},"end":{"line":32,"character":45}},"context":{"diagnostics":[],"triggerKind":2}}}Content-Length: 161 {"jsonrpc":"2.0","id":6,"method":"textDocument/semanticTokens/full","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"}}}Content-Length: 64 {"jsonrpc":"2.0","method":"$/setTrace","params":{"value":"off"}}Content-Length: 156 {"jsonrpc":"2.0","id":7,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"}}}Content-Length: 275 {"jsonrpc":"2.0","id":8,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///home/orkun/qt_work/qt_projects/calqlatr/Main.qml"},"range":{"start":{"line":32,"character":45},"end":{"line":32,"character":45}},"context":{"diagnostics":[],"triggerKind":2}}}Content-Length: 44 {"jsonrpc":"2.0","id":9,"method":"shutdown"}