More security and less unexpected behaviour. #8
			
				
			
		
		
		
	| 
						 | 
				
			
			@ -329,10 +329,10 @@ font: "Noto Sans CJK KR";</string>
 | 
			
		|||
          <property name="bottomMargin">
 | 
			
		||||
           <number>0</number>
 | 
			
		||||
          </property>
 | 
			
		||||
          <item>
 | 
			
		||||
          <item alignment="Qt::AlignRight">
 | 
			
		||||
           <widget class="QLabel" name="recipeNameLabel">
 | 
			
		||||
            <property name="sizePolicy">
 | 
			
		||||
             <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
 | 
			
		||||
             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
 | 
			
		||||
              <horstretch>0</horstretch>
 | 
			
		||||
              <verstretch>0</verstretch>
 | 
			
		||||
             </sizepolicy>
 | 
			
		||||
| 
						 | 
				
			
			@ -361,6 +361,26 @@ font: "Noto Sans CJK KR";</string>
 | 
			
		|||
            </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
          </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>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -96,27 +96,11 @@
 | 
			
		|||
            <item>
 | 
			
		||||
             <widget class="QWidget" name="recipeNamePanel" native="true">
 | 
			
		||||
              <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>
 | 
			
		||||
                <widget class="QLineEdit" name="recipeNameEdit">
 | 
			
		||||
                 <property name="font">
 | 
			
		||||
                  <font>
 | 
			
		||||
                   <pointsize>16</pointsize>
 | 
			
		||||
                   <weight>3</weight>
 | 
			
		||||
                   <italic>false</italic>
 | 
			
		||||
                   <bold>false</bold>
 | 
			
		||||
| 
						 | 
				
			
			@ -158,7 +142,7 @@
 | 
			
		|||
                      <second>0</second>
 | 
			
		||||
                      <year>1999</year>
 | 
			
		||||
                      <month>12</month>
 | 
			
		||||
                      <day>25</day>
 | 
			
		||||
                      <day>24</day>
 | 
			
		||||
                     </datetime>
 | 
			
		||||
                    </property>
 | 
			
		||||
                    <property name="currentSection">
 | 
			
		||||
| 
						 | 
				
			
			@ -418,16 +402,6 @@
 | 
			
		|||
            <property name="bottomMargin">
 | 
			
		||||
             <number>0</number>
 | 
			
		||||
            </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>
 | 
			
		||||
             <widget class="QWidget" name="ingredientsSubPanel" native="true">
 | 
			
		||||
              <layout class="QVBoxLayout" name="verticalLayout_12">
 | 
			
		||||
| 
						 | 
				
			
			@ -832,7 +806,10 @@
 | 
			
		|||
         <enum>Qt::LeftToRight</enum>
 | 
			
		||||
        </property>
 | 
			
		||||
        <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 name="standardButtons">
 | 
			
		||||
         <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										3
									
								
								main.cpp
								
								
								
								
							
							
						
						
									
										3
									
								
								main.cpp
								
								
								
								
							| 
						 | 
				
			
			@ -20,7 +20,7 @@ int main(int argc, char *argv[])
 | 
			
		|||
 | 
			
		||||
	Recipe rec("Example",
 | 
			
		||||
			   ri,
 | 
			
		||||
			   Instruction("<b>BOLD</b><i>iTaLiCs</i>"),
 | 
			
		||||
			   Instruction("Placeholder Text"),
 | 
			
		||||
			   QImage(),
 | 
			
		||||
			   vector<RecipeTag>({RecipeTag("testing"),
 | 
			
		||||
								  RecipeTag("fake")}),
 | 
			
		||||
| 
						 | 
				
			
			@ -32,7 +32,6 @@ int main(int argc, char *argv[])
 | 
			
		|||
	bool success = recipeDB.storeRecipe(rec);
 | 
			
		||||
	printf("Storage successful: %d\n", success);
 | 
			
		||||
 | 
			
		||||
	//recipeDB.selectFrom("recipe", "recipeId, name", "").printData();
 | 
			
		||||
	w.loadFromRecipe(recipeDB.retrieveRandomRecipe());
 | 
			
		||||
 | 
			
		||||
	a.exec();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue