From 73f598ff9fe776a109f513b572a8f877e3beeb62 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 22 Jun 2017 08:54:01 +0200 Subject: [PATCH] Fix code style CURA-3712 --- plugins/3MFReader/plugin.json | 2 +- plugins/3MFWriter/plugin.json | 4 ++-- plugins/AutoSave/plugin.json | 2 +- plugins/ChangeLogPlugin/plugin.json | 2 +- plugins/CuraEngineBackend/plugin.json | 2 +- plugins/CuraProfileReader/plugin.json | 2 +- plugins/CuraProfileWriter/plugin.json | 2 +- plugins/GCodeProfileReader/plugin.json | 2 +- plugins/GCodeReader/plugin.json | 2 +- plugins/GCodeWriter/plugin.json | 2 +- plugins/ImageReader/plugin.json | 2 +- plugins/LayerView/plugin.json | 2 +- plugins/LegacyProfileReader/plugin.json | 2 +- plugins/MachineSettingsAction/plugin.json | 2 +- plugins/PerObjectSettingsTool/plugin.json | 2 +- plugins/RemovableDriveOutputDevice/plugin.json | 4 ++-- plugins/SliceInfoPlugin/plugin.json | 2 +- plugins/UM3NetworkPrinting/plugin.json | 2 +- plugins/USBPrinting/plugin.json | 2 +- plugins/UltimakerMachineActions/plugin.json | 2 +- .../VersionUpgrade21to22/plugin.json | 2 +- .../VersionUpgrade22to24/plugin.json | 2 +- .../VersionUpgrade25to26/plugin.json | 2 +- plugins/X3DReader/plugin.json | 2 +- plugins/XRayView/plugin.json | 2 +- plugins/XmlMaterialProfile/plugin.json | 2 +- resources/qml/Cura.qml | 17 ++++++++--------- 27 files changed, 36 insertions(+), 37 deletions(-) diff --git a/plugins/3MFReader/plugin.json b/plugins/3MFReader/plugin.json index c742328e15..1d9dadfaab 100644 --- a/plugins/3MFReader/plugin.json +++ b/plugins/3MFReader/plugin.json @@ -5,4 +5,4 @@ "description": "Provides support for reading 3MF files.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/3MFWriter/plugin.json b/plugins/3MFWriter/plugin.json index a86177de63..cd782c270a 100644 --- a/plugins/3MFWriter/plugin.json +++ b/plugins/3MFWriter/plugin.json @@ -1,8 +1,8 @@ { - "name": "3MF Writer", + "name": "3MF Writer", "author": "Ultimaker", "version": "1.0.0", "description": "Provides support for writing 3MF files.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/AutoSave/plugin.json b/plugins/AutoSave/plugin.json index d2a31b21ef..6b1c5af4be 100644 --- a/plugins/AutoSave/plugin.json +++ b/plugins/AutoSave/plugin.json @@ -5,4 +5,4 @@ "description": "Automatically saves Preferences, Machines and Profiles after changes.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/ChangeLogPlugin/plugin.json b/plugins/ChangeLogPlugin/plugin.json index bd67d2ba12..d200394182 100644 --- a/plugins/ChangeLogPlugin/plugin.json +++ b/plugins/ChangeLogPlugin/plugin.json @@ -5,4 +5,4 @@ "description": "Shows changes since latest checked version.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/CuraEngineBackend/plugin.json b/plugins/CuraEngineBackend/plugin.json index 5d2060167e..ae9e664bdc 100644 --- a/plugins/CuraEngineBackend/plugin.json +++ b/plugins/CuraEngineBackend/plugin.json @@ -5,4 +5,4 @@ "api": 4, "version": "1.0.0", "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/CuraProfileReader/plugin.json b/plugins/CuraProfileReader/plugin.json index 9546709041..1864939353 100644 --- a/plugins/CuraProfileReader/plugin.json +++ b/plugins/CuraProfileReader/plugin.json @@ -5,4 +5,4 @@ "description": "Provides support for importing Cura profiles.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/CuraProfileWriter/plugin.json b/plugins/CuraProfileWriter/plugin.json index c6884cb16f..b0b62a3767 100644 --- a/plugins/CuraProfileWriter/plugin.json +++ b/plugins/CuraProfileWriter/plugin.json @@ -5,4 +5,4 @@ "description": "Provides support for exporting Cura profiles.", "api": 4, "i18n-catalog":"cura" -} \ No newline at end of file +} diff --git a/plugins/GCodeProfileReader/plugin.json b/plugins/GCodeProfileReader/plugin.json index a2b35513dd..dbbf4ee931 100644 --- a/plugins/GCodeProfileReader/plugin.json +++ b/plugins/GCodeProfileReader/plugin.json @@ -5,4 +5,4 @@ "description": "Provides support for importing profiles from g-code files.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/GCodeReader/plugin.json b/plugins/GCodeReader/plugin.json index 567024d25f..3bbe933c80 100644 --- a/plugins/GCodeReader/plugin.json +++ b/plugins/GCodeReader/plugin.json @@ -5,4 +5,4 @@ "description": "Allows loading and displaying G-code files.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/GCodeWriter/plugin.json b/plugins/GCodeWriter/plugin.json index 3161183432..40b63a435c 100644 --- a/plugins/GCodeWriter/plugin.json +++ b/plugins/GCodeWriter/plugin.json @@ -5,4 +5,4 @@ "description": "Writes GCode to a file.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/ImageReader/plugin.json b/plugins/ImageReader/plugin.json index 70dbf23240..c7cbc59baa 100644 --- a/plugins/ImageReader/plugin.json +++ b/plugins/ImageReader/plugin.json @@ -5,4 +5,4 @@ "description": "Enables ability to generate printable geometry from 2D image files.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/LayerView/plugin.json b/plugins/LayerView/plugin.json index a998c8baf3..8896f34fac 100644 --- a/plugins/LayerView/plugin.json +++ b/plugins/LayerView/plugin.json @@ -5,4 +5,4 @@ "description": "Provides the Layer view.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/LegacyProfileReader/plugin.json b/plugins/LegacyProfileReader/plugin.json index 9960893323..625093ce83 100644 --- a/plugins/LegacyProfileReader/plugin.json +++ b/plugins/LegacyProfileReader/plugin.json @@ -5,4 +5,4 @@ "description": "Provides support for importing profiles from legacy Cura versions.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/MachineSettingsAction/plugin.json b/plugins/MachineSettingsAction/plugin.json index 3d63641c5c..af63e3a9c8 100644 --- a/plugins/MachineSettingsAction/plugin.json +++ b/plugins/MachineSettingsAction/plugin.json @@ -5,4 +5,4 @@ "description": "Provides a way to change machine settings (such as build volume, nozzle size, etc)", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/PerObjectSettingsTool/plugin.json b/plugins/PerObjectSettingsTool/plugin.json index d1c0cc444c..772ce3aeca 100644 --- a/plugins/PerObjectSettingsTool/plugin.json +++ b/plugins/PerObjectSettingsTool/plugin.json @@ -5,4 +5,4 @@ "description": "Provides the Per Model Settings.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/RemovableDriveOutputDevice/plugin.json b/plugins/RemovableDriveOutputDevice/plugin.json index d3e2a5f93d..668e66965d 100644 --- a/plugins/RemovableDriveOutputDevice/plugin.json +++ b/plugins/RemovableDriveOutputDevice/plugin.json @@ -1,8 +1,8 @@ { "name": "Removable Drive Output Device Plugin", "author": "Ultimaker B.V.", - "description": "Provides removable drive hotplugging and writing support.", + "description": "Provides removable drive hotplugging and writing support.", "version": "1.0", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/SliceInfoPlugin/plugin.json b/plugins/SliceInfoPlugin/plugin.json index 58416521ab..9f303a67e0 100644 --- a/plugins/SliceInfoPlugin/plugin.json +++ b/plugins/SliceInfoPlugin/plugin.json @@ -5,4 +5,4 @@ "description": "Submits anonymous slice info. Can be disabled through preferences.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/UM3NetworkPrinting/plugin.json b/plugins/UM3NetworkPrinting/plugin.json index af33cb8556..7b46e7cfee 100644 --- a/plugins/UM3NetworkPrinting/plugin.json +++ b/plugins/UM3NetworkPrinting/plugin.json @@ -5,4 +5,4 @@ "version": "1.0", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/USBPrinting/plugin.json b/plugins/USBPrinting/plugin.json index 2d07848aae..6dcfdef981 100644 --- a/plugins/USBPrinting/plugin.json +++ b/plugins/USBPrinting/plugin.json @@ -5,4 +5,4 @@ "api": 4, "description": "Accepts G-Code and sends them to a printer. Plugin can also update firmware.", "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/UltimakerMachineActions/plugin.json b/plugins/UltimakerMachineActions/plugin.json index 57709e22e5..f0b01bb15e 100644 --- a/plugins/UltimakerMachineActions/plugin.json +++ b/plugins/UltimakerMachineActions/plugin.json @@ -5,4 +5,4 @@ "description": "Provides machine actions for Ultimaker machines (such as bed leveling wizard, selecting upgrades, etc)", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/VersionUpgrade/VersionUpgrade21to22/plugin.json b/plugins/VersionUpgrade/VersionUpgrade21to22/plugin.json index 1945c3e3bb..22e053bdb5 100644 --- a/plugins/VersionUpgrade/VersionUpgrade21to22/plugin.json +++ b/plugins/VersionUpgrade/VersionUpgrade21to22/plugin.json @@ -5,4 +5,4 @@ "description": "Upgrades configurations from Cura 2.1 to Cura 2.2.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/VersionUpgrade/VersionUpgrade22to24/plugin.json b/plugins/VersionUpgrade/VersionUpgrade22to24/plugin.json index 1487c365d3..3e93b4bbf8 100644 --- a/plugins/VersionUpgrade/VersionUpgrade22to24/plugin.json +++ b/plugins/VersionUpgrade/VersionUpgrade22to24/plugin.json @@ -5,4 +5,4 @@ "description": "Upgrades configurations from Cura 2.2 to Cura 2.4.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/VersionUpgrade/VersionUpgrade25to26/plugin.json b/plugins/VersionUpgrade/VersionUpgrade25to26/plugin.json index d3fc10f401..958127fe5c 100644 --- a/plugins/VersionUpgrade/VersionUpgrade25to26/plugin.json +++ b/plugins/VersionUpgrade/VersionUpgrade25to26/plugin.json @@ -5,4 +5,4 @@ "description": "Upgrades configurations from Cura 2.5 to Cura 2.6.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/X3DReader/plugin.json b/plugins/X3DReader/plugin.json index 700df79513..d4d437726b 100644 --- a/plugins/X3DReader/plugin.json +++ b/plugins/X3DReader/plugin.json @@ -5,4 +5,4 @@ "description": "Provides support for reading X3D files.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/XRayView/plugin.json b/plugins/XRayView/plugin.json index 095fcbedf3..ac4e632e79 100644 --- a/plugins/XRayView/plugin.json +++ b/plugins/XRayView/plugin.json @@ -5,4 +5,4 @@ "description": "Provides the X-Ray view.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/plugins/XmlMaterialProfile/plugin.json b/plugins/XmlMaterialProfile/plugin.json index b475d56fc3..a18342fcf9 100644 --- a/plugins/XmlMaterialProfile/plugin.json +++ b/plugins/XmlMaterialProfile/plugin.json @@ -5,4 +5,4 @@ "description": "Provides capabilities to read and write XML-based material profiles.", "api": 4, "i18n-catalog": "cura" -} \ No newline at end of file +} diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index bc77196b90..3addb72bed 100755 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -261,29 +261,28 @@ UM.MainWindow if (drop.urls.length > 0) { // As the drop area also supports plugins, first check if it's a plugin that was dropped. - if(drop.urls.length == 1) + if (drop.urls.length == 1) { - if(PluginRegistry.isPluginFile(drop.urls[0])) + if (PluginRegistry.isPluginFile(drop.urls[0])) { // Try to install plugin & close. var result = PluginRegistry.installPlugin(drop.urls[0]); - pluginInstallDialog.text = result.message - if(result.status == "ok") + pluginInstallDialog.text = result.message; + if (result.status == "ok") { - pluginInstallDialog.icon = StandardIcon.Information + pluginInstallDialog.icon = StandardIcon.Information; } - else if(result.status == "duplicate") + else if (result.status == "duplicate") { - pluginInstallDialog.icon = StandardIcon.Warning + pluginInstallDialog.icon = StandardIcon.Warning; } else { - pluginInstallDialog.icon = StandardIcon.Critical + pluginInstallDialog.icon = StandardIcon.Critical; } pluginInstallDialog.open(); return; } - } openDialog.handleOpenFileUrls(drop.urls);