Merge branch 'sagidayan-master'

This commit is contained in:
Liran BN 2014-09-01 20:05:27 +03:00
commit 9bd232d44e
7 changed files with 462 additions and 277 deletions

View file

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-08-31T12:32:46. --> <!-- Written by QtCreator 3.2.0, 2014-09-01T00:26:45. -->
<qtcreator> <qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{27d037c7-80c2-4adc-9ebd-7fcaa787aa69}</value>
</data>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value> <value type="int">0</value>
@ -54,14 +58,14 @@
<data> <data>
<variable>ProjectExplorer.Project.Target.0</variable> <variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.3.0 MinGW 32bit</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.3.0 MinGW 32bit</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.win32_mingw482_kit</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5099a051-769d-496c-9c12-be2a0d9569cf}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Dropbox/cpp/jceConQT/build-jceGrade-Desktop_Qt_5_3_0_MinGW_32bit-Debug</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/sagi/Development/SocialDev/build-jceGrade-Desktop-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -78,7 +82,10 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@ -94,7 +101,10 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@ -114,7 +124,7 @@
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap> </valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Dropbox/cpp/jceConQT/build-jceGrade-Desktop_Qt_5_3_0_MinGW_32bit-Release</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/sagi/Development/SocialDev/build-jceGrade-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
@ -131,7 +141,10 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@ -147,7 +160,10 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/> <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@ -220,7 +236,7 @@
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">jceGrade</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">jceGrade</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Dropbox/cpp/jceConQT/jceAverageCalculator/jceGrade.pro</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/sagi/Development/SocialDev/jceAverageCalculator/jceGrade.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">jceGrade.pro</value> <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">jceGrade.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
@ -241,11 +257,11 @@
<value type="int">1</value> <value type="int">1</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="QByteArray">{f3f3b933-8225-47b3-aa78-fc5de0bd714b}</value> <value type="int">16</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable> <variable>Version</variable>
<value type="int">15</value> <value type="int">16</value>
</data> </data>
</qtcreator> </qtcreator>

251
jceGrade.pro.user.3.2-pre1 Normal file
View file

@ -0,0 +1,251 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.1.1, 2014-08-31T12:32:46. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.3.0 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.3.0 MinGW 32bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.53.win32_mingw482_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Dropbox/cpp/jceConQT/build-jceGrade-Desktop_Qt_5_3_0_MinGW_32bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/Dropbox/cpp/jceConQT/build-jceGrade-Desktop_Qt_5_3_0_MinGW_32bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">jceGrade</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/Dropbox/cpp/jceConQT/jceAverageCalculator/jceGrade.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">jceGrade.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QByteArray">{f3f3b933-8225-47b3-aa78-fc5de0bd714b}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">15</value>
</data>
</qtcreator>

View file

@ -32,13 +32,14 @@ MainScreen::MainScreen(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainScr
this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting); this->courseTableMgr = new coursesTableManager(ui->coursesTable,userLoginSetting);
this->loginHandel = new loginHandler(userLoginSetting); this->loginHandel = new loginHandler(userLoginSetting);
this->calendar = new CalendarManager(ui->calendartext); this->calendar = new CalendarManager(ui->calendartext);
this->data = new SaveData();
//check login File //check login File
SaveData::init(); //SaveData::init(); --> No need. constructor dose everything.
if (SaveData::isSaved()) if (data->isSaved())
{ {
ui->usrnmLineEdit->setText(SaveData::getUsername()); ui->usrnmLineEdit->setText(data->getUsername());
ui->pswdLineEdit->setText(SaveData::getPassword()); ui->pswdLineEdit->setText(data->getPassword());
ui->keepLogin->setChecked(true); ui->keepLogin->setChecked(true);
} }
} }
@ -48,6 +49,9 @@ MainScreen::~MainScreen()
delete userLoginSetting; delete userLoginSetting;
delete loginHandel; delete loginHandel;
delete ui; delete ui;
//Delete save data
delete data;
} }
void MainScreen::on_loginButton_clicked() void MainScreen::on_loginButton_clicked()
{ {
@ -261,10 +265,12 @@ void MainScreen::on_actionExit_triggered()
void MainScreen::on_keepLogin_clicked() void MainScreen::on_keepLogin_clicked()
{ {
if (ui->keepLogin->isChecked()) if (ui->keepLogin->isChecked())
SaveData::save(ui->usrnmLineEdit->text(),ui->pswdLineEdit->text()); {
data->setUsername(ui->usrnmLineEdit->text());
data->setPassword(ui->pswdLineEdit->text());
}
else else
SaveData::deleteData(); data->reset();
} }
void MainScreen::on_actionHow_To_triggered() void MainScreen::on_actionHow_To_triggered()

View file

@ -68,7 +68,7 @@ private:
Ui::MainScreen *ui; Ui::MainScreen *ui;
user *userLoginSetting; user *userLoginSetting;
SaveData *data;
CalendarManager * calendar; CalendarManager * calendar;
coursesTableManager *courseTableMgr; coursesTableManager *courseTableMgr;
loginHandler *loginHandel; loginHandler *loginHandel;

View file

@ -1,200 +1,108 @@
#include "savedata.h" #include "savedata.h"
/**
* @brief Checks the status tag in the file
* @return boolean the status
*/
bool SaveData::isSaved()
{
QString status;
QFile* file = new QFile(FILE_NAME);
/* Opening file for read */
if(file->open(QIODevice::ReadOnly|QIODevice::Text))
{
status = getValViaTag("status", file);
if(status == "true")
{
file->close(); //close & return
return true;
}
return false; //close & return
file->close();
}
/* If Faild to open */
std::cout << "Faild To Accsess file: " << FILE_NAME << std::endl;
return false;
}
/**
* @brief This Function will modify the file, and save the data.
* @param username - QString
* @param password - QString
* @return true if saved - false if error
*/
bool SaveData::save(QString username, QString password)
{
std::cout << "Trying to save data..." << std::endl;
QFile file(FILE_NAME);
if(!file.open(QIODevice::WriteOnly|QIODevice::Text))
return false; /* IO Error! */
QTextStream output(&file);
QString hash_pass = hashPassword(password);
output << "[status]true[/]\n[username]"<<username<<"[/]\n"<<"[password]"<<hash_pass<<"[/]"; //Un Hashed Password in string!
file.close();
std::cout << "Saved!" << std::endl;
return true;
}
/**
* @brief Deletes the data from file, and sets status tag to false.
* @return true if success
*/
bool SaveData::deleteData()
{
QFile file(FILE_NAME);
if(!file.open(QIODevice::WriteOnly|QIODevice::Text))
return false; /* IO Error! */
QTextStream output(&file);
output << DEFAULT_DATA_EMPTY;
file.close();
return true;
}
/**
* @brief username getter
* @return QString - username
*/
QString SaveData::getUsername()
{
QString username = "";
QFile* file = new QFile(FILE_NAME);
/* Opening file for read */
if(file->open(QIODevice::ReadOnly|QIODevice::Text))
username = getValViaTag("username", file);
file->close();
return username;
}
/**
* @brief getter for password
* @return QString - password
*/
QString SaveData::getPassword()
{
QString pass = "";
QFile* file = new QFile(FILE_NAME);
/* Opening file for read */
if(file->open(QIODevice::ReadOnly|QIODevice::Text))
pass = getValViaTag("password", file);
file->close();
pass = deHashPasword(pass);
return pass;
}
/** /**
* @brief This is A functions that will init the tags file. * @brief This is A functions that will init the tags file.
* if it exist - do nothing * if it exist - do nothing
* if there is no file, it will create it and run the deleteData function * if there is no file, it will create it and run the deleteData function
* so tags will be set. * so tags will be set.
*/ */
void SaveData::init() SaveData::SaveData()
{ {
QFile file(FILE_NAME); QFile file(FILE_NAME);
if(!file.exists()) if(!file.exists())
{ {
file.open(QIODevice::ReadWrite | QIODevice::Text); file.open(QIODevice::ReadWrite | QIODevice::Text);
file.close(); file.close();
deleteData(); createDB();
save();
} }
else
load();
} }
/** bool SaveData::isSaved()
* @brief This function will return the vale of a given tag name.
* NOTE: valid tag names are : "status", "username", "password"
* if tag is invalid - will return "" - an empty QString!
* @param tag - QString, the tag name
* @param file - a QFile pointer
* @return QString - the value in tag
* NOTE: if NULL value, or an invalid tag name -> return "" (empty QString!)
*/
QString SaveData::getValViaTag(QString tag, QFile* file)
{ {
QString val, line , tmpTag; if(DB.value("username") == "")
QTextStream textStream( file); return false;
while((line = textStream.readLine()) != NULL) return true;
{
std::cout << "DEBUG: line => " << line.toStdString() << std::endl;
for(int i = 0 ; i< line.length() ;++i)
{
if(line[i] == '[' && line[i+1] != '/') //get open tag at begining of line and not end of tag ("[/")
{
i++;
tmpTag = line.mid(i, tag.length());
if(tmpTag == tag)
{
i+= tag.length()+1; // i is now right after '['
int j = i;
while(line[j] != '[')// put j at the end of the value
j++;
/* Then... the value is :*/
val = line.mid(i, j-i);
std::cout << "DEBUG: ["<<tag.toStdString()<<"]"<<val.toStdString()<<"[/]"<<std::endl;
return val;
}
}
}
}
return ""; //this will be as NULL
} }
/** void SaveData::reset()
* @brief This function will provide the user the most basic security of the stored password.
* it is NOT an encryption! it will store every char of the password as ascii encoded,
* separated by "-" for the deHsh func.
* @param pass - a QString to "hash"
* @return QString - The "hashed" password
*/
QString SaveData::hashPassword(QString pass)
{ {
QString hash=""; DB.clear();
int code; createDB();
for(QChar c : pass) save();
{
code = (int)c.toLatin1();
hash.append(QString::number(code));
hash.append("-");
}
return hash;
} }
void SaveData::setUsername(QString username)
/**
* @brief This function will "dehash" the "hashed" password.
* uses standard c string.h strtok with the "-" as the choping points.
* builds a QString from the ascii.
* @param pass - The hashed password
* @return QString - password uncoded
*/
QString SaveData::deHashPasword(QString pass)
{ {
char* cpyPass = strdup(pass.toStdString().c_str()); DB.insert("username", username);
char* tok; save();
char* ch; }
int val;
QString password; void SaveData::setPassword(QString password)
tok = strtok(cpyPass,"-"); {
while (tok != NULL) DB.insert("password", password);
{ save();
ch = tok; }
val = atoi(ch);
password.append(val); void SaveData::setCal(QString cal)
tok = strtok(NULL, "-"); {
} DB.insert("calendar", cal);
return password; save();
}
void SaveData::setLocal(QString local)
{
DB.insert("local", local);
save();
}
QString SaveData::getUsername()
{
return DB.value("username");
}
QString SaveData::getPassword()
{
return DB.value("password");
}
QString SaveData::getLocal()
{
return DB.value("local");
}
QString SaveData::getCal()
{
return DB.value("calendar");
}
void SaveData::load()
{
QFile file(FILE_NAME);
file.open(QIODevice::ReadOnly);
QDataStream in(&file);
in >> DB;
file.close();
}
void SaveData::save()
{
QFile file(FILE_NAME);
file.open(QIODevice::WriteOnly);
QDataStream out(&file);
out << DB;
file.flush();
file.close();
}
void SaveData::createDB()
{
DB.insert("username", "");
DB.insert("password", "");
DB.insert("local", "default");
DB.insert("calendar", "");
} }

View file

@ -27,28 +27,32 @@
#include <QString> #include <QString>
#include <QFile> #include <QFile>
#include <QTextStream> #include <QTextStream>
#include <QDebug>
/* C/C++ libs */ #include <QMap>
#include <string.h>
#include <stdlib.h>
#include <iostream>
#define FILE_NAME "JAC_DB.dat" #define FILE_NAME "JAC_DB.dat"
#define DEFAULT_DATA_EMPTY "[status]false[/]\n[username][/]\n[password][/]"
class SaveData class SaveData
{ {
public: public:
bool static isSaved(); SaveData();
bool static save(QString username, QString password); bool isSaved();
bool static deleteData(); void reset();
QString static getUsername(); void setUsername(QString username);
QString static getPassword(); void setPassword(QString password);
void static init(); void setCal(QString cal);
void setLocal(QString local);
QString getUsername();
QString getPassword();
QString getCal();
QString getLocal();
private: private:
QString static getValViaTag(QString tag, QFile *file); QMap<QString, QString> DB;
QString static hashPassword(QString pass); void load();
QString static deHashPasword(QString pass); void save();
void createDB();
}; };
#endif // SAVEDATA_H #endif // SAVEDATA_H