[PC-BSD Commits] r362 - pcbsd/trunk/PCInstall
svn at pcbsd.org
svn at pcbsd.org
Thu Jun 21 10:50:18 PDT 2007
Author: kris
Date: 2007-06-21 18:50:18 +0100 (Thu, 21 Jun 2007)
New Revision: 362
Modified:
pcbsd/trunk/PCInstall/pcinstall.ui
pcbsd/trunk/PCInstall/pcinstall.ui.h
Log:
Installer now loads license from file on cd
Modified: pcbsd/trunk/PCInstall/pcinstall.ui
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.ui 2007-06-21 16:15:07 UTC (rev 361)
+++ pcbsd/trunk/PCInstall/pcinstall.ui 2007-06-21 17:50:18 UTC (rev 362)
@@ -1229,7 +1229,7 @@
</widget>
<widget class="QTextEdit">
<property name="name">
- <cstring>textEdit4</cstring>
+ <cstring>textLicense</cstring>
</property>
<property name="geometry">
<rect>
@@ -7655,7 +7655,7 @@
<tabstop>comboTZone</tabstop>
<tabstop>checkTimeSync</tabstop>
<tabstop>radioFreshInstall</tabstop>
- <tabstop>textEdit4</tabstop>
+ <tabstop>textLicense</tabstop>
<tabstop>checkLicAgree</tabstop>
<tabstop>linePassword</tabstop>
<tabstop>linePassword2</tabstop>
@@ -7825,6 +7825,7 @@
<function access="private">detectRAIDMirror()</function>
<function access="private">loadComponents()</function>
<function access="private">refreshComponents()</function>
+ <function access="private">loadLicense()</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
</UI>
Modified: pcbsd/trunk/PCInstall/pcinstall.ui.h
===================================================================
--- pcbsd/trunk/PCInstall/pcinstall.ui.h 2007-06-21 16:15:07 UTC (rev 361)
+++ pcbsd/trunk/PCInstall/pcinstall.ui.h 2007-06-21 17:50:18 UTC (rev 362)
@@ -141,6 +141,8 @@
connect( listBoxLang, SIGNAL( selectionChanged () ), this, SLOT(listBoxLangChanged() ) );
+ // Load the license text
+ loadLicense();
}
@@ -3090,3 +3092,25 @@
} // End while loop
}
+
+
+void PCInstall::loadLicense()
+{
+ QString lic;
+ QString line;
+
+ QFile file( "//usr/local/pcbsd/resources/license.txt" );
+ if ( file.open( IO_ReadOnly ) ) {
+ QTextStream stream( &file );
+ QString line;
+ while ( !stream.atEnd() ) {
+ line = stream.readLine(); // line of text excluding '\n'
+ lic = lic + line + "\n";
+
+ }
+ file.close();
+ }
+
+ textLicense->setText(lic);
+
+}
More information about the Commits
mailing list