Browse Source

fixed running with qt 5.2

cl-refactor
arkpar 10 years ago
parent
commit
4e2b5dd352
  1. 4
      mix/qml/NewProjectDialog.qml
  2. 1
      mix/qml/ProjectList.qml
  3. 6
      mix/qml/js/ProjectModel.js

4
mix/qml/NewProjectDialog.qml

@ -1,8 +1,8 @@
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1
import QtQuick.Window 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Dialogs 1.1
Window {

1
mix/qml/ProjectList.qml

@ -80,7 +80,6 @@ Item {
hoverEnabled: true
z:2
onClicked: {
console.log("clicked");
textInput.forceActiveFocus();
}
}

6
mix/qml/js/ProjectModel.js

@ -90,7 +90,7 @@ function addFile(fileName) {
name: isContract ? "Contract" : fileName,
documentId: fileName,
isText: isContract || extension === ".html" || extension === ".js",
isContract: fileData,
isContract: isContract,
};
projectListModel.append(fileData);
@ -130,11 +130,11 @@ function doCreateProject(title, path) {
var contractsFile = "contracts.sol";
var projectData = {
title: title,
files: [ indexFile, contractsFile ]
files: [ contractsFile, indexFile ]
};
//TODO: copy from template
fileIo.writeFile(dirPath + indexFile, "<html></html>");
fileIo.writeFile(dirPath + contractsFile, "contract MyContract {\n }\n");
fileIo.writeFile(dirPath + contractsFile, "contract MyContract {\n}\n");
var json = JSON.stringify(projectData);
fileIo.writeFile(projectFile, json);
loadProject(dirPath);

Loading…
Cancel
Save