More security and less unexpected behaviour. #8

Merged
andrewlalis merged 7 commits from development into master 2018-03-30 14:20:54 +00:00
3 changed files with 29 additions and 33 deletions
Showing only changes of commit 50ff37599c - Show all commits

View File

@ -329,10 +329,10 @@ font: &quot;Noto Sans CJK KR&quot;;</string>
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item> <item alignment="Qt::AlignRight">
<widget class="QLabel" name="recipeNameLabel"> <widget class="QLabel" name="recipeNameLabel">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -361,6 +361,26 @@ font: &quot;Noto Sans CJK KR&quot;;</string>
</property> </property>
</widget> </widget>
</item> </item>
<item alignment="Qt::AlignLeft|Qt::AlignBottom">
<widget class="QLabel" name="authorLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Noto Sans CJK KR Light</family>
<pointsize>14</pointsize>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="text">
<string>By Unknown Author</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -96,27 +96,11 @@
<item> <item>
<widget class="QWidget" name="recipeNamePanel" native="true"> <widget class="QWidget" name="recipeNamePanel" native="true">
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QLabel" name="recipeNameLabel">
<property name="font">
<font>
<weight>3</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>Edit Recipe</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item> <item>
<widget class="QLineEdit" name="recipeNameEdit"> <widget class="QLineEdit" name="recipeNameEdit">
<property name="font"> <property name="font">
<font> <font>
<pointsize>16</pointsize>
<weight>3</weight> <weight>3</weight>
<italic>false</italic> <italic>false</italic>
<bold>false</bold> <bold>false</bold>
@ -158,7 +142,7 @@
<second>0</second> <second>0</second>
<year>1999</year> <year>1999</year>
<month>12</month> <month>12</month>
<day>25</day> <day>24</day>
</datetime> </datetime>
</property> </property>
<property name="currentSection"> <property name="currentSection">
@ -418,16 +402,6 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item>
<widget class="QLabel" name="ingredientsPanelLabel">
<property name="text">
<string>Ingredients</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item> <item>
<widget class="QWidget" name="ingredientsSubPanel" native="true"> <widget class="QWidget" name="ingredientsSubPanel" native="true">
<layout class="QVBoxLayout" name="verticalLayout_12"> <layout class="QVBoxLayout" name="verticalLayout_12">
@ -832,7 +806,10 @@
<enum>Qt::LeftToRight</enum> <enum>Qt::LeftToRight</enum>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>false</bool> <bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property> </property>
<property name="standardButtons"> <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>

View File

@ -20,7 +20,7 @@ int main(int argc, char *argv[])
Recipe rec("Example", Recipe rec("Example",
ri, ri,
Instruction("<b>BOLD</b><i>iTaLiCs</i>"), Instruction("Placeholder Text"),
QImage(), QImage(),
vector<RecipeTag>({RecipeTag("testing"), vector<RecipeTag>({RecipeTag("testing"),
RecipeTag("fake")}), RecipeTag("fake")}),
@ -32,7 +32,6 @@ int main(int argc, char *argv[])
bool success = recipeDB.storeRecipe(rec); bool success = recipeDB.storeRecipe(rec);
printf("Storage successful: %d\n", success); printf("Storage successful: %d\n", success);
//recipeDB.selectFrom("recipe", "recipeId, name", "").printData();
w.loadFromRecipe(recipeDB.retrieveRandomRecipe()); w.loadFromRecipe(recipeDB.retrieveRandomRecipe());
a.exec(); a.exec();