Reduced height of password generator dialog (Bug #2831504)

Escape HTML chars in detail view (Bug #2836096)
Don't call QT_REQUIRE_VERSION as it produces a compiler warning/error (Bug #2815290)

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@329 b624d157-de02-0410-bad0-e51aec6abb33
master
sniperbeamer 16 years ago
parent 29ded0a62b
commit 0a2733a992
  1. 133
      src/dialogs/PasswordGenDlg.cpp
  2. 2
      src/dialogs/PasswordGenDlg.h
  3. 331
      src/forms/EditEntryDlg.ui
  4. 378
      src/forms/PasswordGenDlg.ui
  5. 2
      src/main.cpp
  6. 32
      src/mainwindow.cpp

@ -33,13 +33,9 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, bool StandAloneMode,Qt::WFlags fl)
{ {
setupUi(this); setupUi(this);
connect(ButtonGenerate, SIGNAL(clicked()), SLOT(OnGeneratePw())); connect(ButtonGenerate, SIGNAL(clicked()), SLOT(OnGeneratePw()));
connect(Radio_1, SIGNAL(toggled(bool)), SLOT(OnRadio1StateChanged(bool)));
connect(Radio_2, SIGNAL(toggled(bool)), SLOT(OnRadio2StateChanged(bool)));
connect(DialogButtons, SIGNAL(rejected()), SLOT(OnCancel())); connect(DialogButtons, SIGNAL(rejected()), SLOT(OnCancel()));
connect(DialogButtons, SIGNAL(accepted()), SLOT(OnAccept())); connect(DialogButtons, SIGNAL(accepted()), SLOT(OnAccept()));
connect(tabCategory, SIGNAL(currentChanged(int)), SLOT(estimateQuality())); connect(tabCategory, SIGNAL(currentChanged(int)), SLOT(estimateQuality()));
connect(Radio_1, SIGNAL(toggled(bool)), SLOT(estimateQuality()));
connect(Radio_2, SIGNAL(toggled(bool)), SLOT(estimateQuality()));
connect(checkBox1, SIGNAL(toggled(bool)), SLOT(estimateQuality())); connect(checkBox1, SIGNAL(toggled(bool)), SLOT(estimateQuality()));
connect(checkBox2, SIGNAL(toggled(bool)), SLOT(estimateQuality())); connect(checkBox2, SIGNAL(toggled(bool)), SLOT(estimateQuality()));
connect(checkBox3, SIGNAL(toggled(bool)), SLOT(estimateQuality())); connect(checkBox3, SIGNAL(toggled(bool)), SLOT(estimateQuality()));
@ -57,8 +53,6 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, bool StandAloneMode,Qt::WFlags fl)
connect(Check_CollectEntropy, SIGNAL(stateChanged(int)), SLOT(OnCollectEntropyChanged(int))); connect(Check_CollectEntropy, SIGNAL(stateChanged(int)), SLOT(OnCollectEntropyChanged(int)));
connect(ButtonChangeEchoMode, SIGNAL(clicked()), SLOT(SwapEchoMode())); connect(ButtonChangeEchoMode, SIGNAL(clicked()), SLOT(SwapEchoMode()));
connect(tabCategory, SIGNAL(currentChanged(int)), SLOT(setGenerateEnabled())); connect(tabCategory, SIGNAL(currentChanged(int)), SLOT(setGenerateEnabled()));
connect(Radio_1, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled()));
connect(Radio_2, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled()));
connect(checkBox1, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled())); connect(checkBox1, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled()));
connect(checkBox2, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled())); connect(checkBox2, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled()));
connect(checkBox3, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled())); connect(checkBox3, SIGNAL(toggled(bool)), SLOT(setGenerateEnabled()));
@ -87,8 +81,8 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, bool StandAloneMode,Qt::WFlags fl)
tabCategory->setCurrentIndex(config->pwGenCategory()); tabCategory->setCurrentIndex(config->pwGenCategory());
QBitArray pwGenOptions=config->pwGenOptions(); QBitArray pwGenOptions=config->pwGenOptions();
Radio_1->setChecked(pwGenOptions.at(0)); //Radio_1->setChecked(pwGenOptions.at(0));
Radio_2->setChecked(!pwGenOptions.at(0)); //Radio_2->setChecked(!pwGenOptions.at(0));
checkBox1->setChecked(pwGenOptions.at(1)); checkBox1->setChecked(pwGenOptions.at(1));
checkBox2->setChecked(pwGenOptions.at(2)); checkBox2->setChecked(pwGenOptions.at(2));
checkBox3->setChecked(pwGenOptions.at(3)); checkBox3->setChecked(pwGenOptions.at(3));
@ -98,8 +92,8 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, bool StandAloneMode,Qt::WFlags fl)
checkBox7->setChecked(pwGenOptions.at(7)); checkBox7->setChecked(pwGenOptions.at(7));
Check_CollectEntropy->setChecked(pwGenOptions.at(8)); Check_CollectEntropy->setChecked(pwGenOptions.at(8));
Check_CollectOncePerSession->setChecked(pwGenOptions.at(9)); Check_CollectOncePerSession->setChecked(pwGenOptions.at(9));
OnRadio1StateChanged(pwGenOptions.at(0)); //OnRadio1StateChanged(pwGenOptions.at(0));
OnRadio2StateChanged(!pwGenOptions.at(0)); //OnRadio2StateChanged(!pwGenOptions.at(0));
if (pwGenOptions.size()>=14){ if (pwGenOptions.size()>=14){
checkBoxPU->setChecked(pwGenOptions.at(10)); checkBoxPU->setChecked(pwGenOptions.at(10));
checkBoxPL->setChecked(pwGenOptions.at(11)); checkBoxPL->setChecked(pwGenOptions.at(11));
@ -129,7 +123,7 @@ CGenPwDialog::CGenPwDialog(QWidget* parent, bool StandAloneMode,Qt::WFlags fl)
CGenPwDialog::~CGenPwDialog(){ CGenPwDialog::~CGenPwDialog(){
config->setPwGenCategory(tabCategory->currentIndex()); config->setPwGenCategory(tabCategory->currentIndex());
QBitArray pwGenOptions(14); QBitArray pwGenOptions(14);
pwGenOptions.setBit(0,Radio_1->isChecked()); //pwGenOptions.setBit(0,Radio_1->isChecked());
pwGenOptions.setBit(1,checkBox1->isChecked()); pwGenOptions.setBit(1,checkBox1->isChecked());
pwGenOptions.setBit(2,checkBox2->isChecked()); pwGenOptions.setBit(2,checkBox2->isChecked());
pwGenOptions.setBit(3,checkBox3->isChecked()); pwGenOptions.setBit(3,checkBox3->isChecked());
@ -157,34 +151,6 @@ void CGenPwDialog::paintEvent(QPaintEvent *event){
painter.drawPixmap(QPoint(0,0),BannerPixmap); painter.drawPixmap(QPoint(0,0),BannerPixmap);
} }
void CGenPwDialog::OnRadio1StateChanged(bool state)
{
if(state){
checkBox1->setEnabled(true);
checkBox2->setEnabled(true);
checkBox3->setEnabled(true);
checkBox4->setEnabled(true);
checkBox5->setEnabled(true);
checkBox6->setEnabled(true);
checkBox7->setEnabled(true);
}else{
checkBox1->setDisabled(true);
checkBox2->setDisabled(true);
checkBox3->setDisabled(true);
checkBox4->setDisabled(true);
checkBox5->setDisabled(true);
checkBox6->setDisabled(true);
checkBox7->setDisabled(true);
}
}
void CGenPwDialog::OnRadio2StateChanged(bool state){
if(state)
Edit_chars->setEnabled(true);
else
Edit_chars->setDisabled(true);
}
void CGenPwDialog::OnGeneratePw() void CGenPwDialog::OnGeneratePw()
{ {
if(Check_CollectEntropy->isChecked()){ if(Check_CollectEntropy->isChecked()){
@ -198,7 +164,7 @@ void CGenPwDialog::OnGeneratePw()
int length = Spin_Num->value(); int length = Spin_Num->value();
QString password; QString password;
if (tabCategory->currentIndex()==1) if (tabCategory->currentIndex() == 1)
{ {
unsigned int mode = 0; unsigned int mode = 0;
if (checkBoxPU->isChecked()) if (checkBoxPU->isChecked())
@ -225,40 +191,37 @@ void CGenPwDialog::OnGeneratePw()
} }
void CGenPwDialog::estimateQuality(){ void CGenPwDialog::estimateQuality(){
int num=0; int num = 0;
if (tabCategory->currentIndex()==0){ int index = tabCategory->currentIndex();
if(Radio_1->isChecked()){ if (index == 0) {
if(checkBox1->isChecked()) { if (checkBox1->isChecked()) {
num+=26; num+=26;
if (Check_ExcludeLookAlike->isChecked()) if (Check_ExcludeLookAlike->isChecked())
num -= 2; num -= 2;
}
if(checkBox2->isChecked()) {
num+=26;
if (Check_ExcludeLookAlike->isChecked())
num -= 1;
}
if(checkBox3->isChecked()) {
num+=10;
if (Check_ExcludeLookAlike->isChecked())
num -= 2;
}
if(checkBox4->isChecked()) {
num+=32;
if (Check_ExcludeLookAlike->isChecked())
num -= 1;
}
if(checkBox5->isChecked())
num++;
if(checkBox6->isChecked())
num++;
if(checkBox7->isChecked())
num++;
} }
else if (checkBox2->isChecked()) {
num=Edit_chars->text().length(); num+=26;
if (Check_ExcludeLookAlike->isChecked())
num -= 1;
}
if (checkBox3->isChecked()) {
num+=10;
if (Check_ExcludeLookAlike->isChecked())
num -= 2;
}
if (checkBox4->isChecked()) {
num+=32;
if (Check_ExcludeLookAlike->isChecked())
num -= 1;
}
if (checkBox5->isChecked())
num++;
if (checkBox6->isChecked())
num++;
if (checkBox7->isChecked())
num++;
} }
else{ else if (index == 1) {
if (checkBoxPU->isChecked()) if (checkBoxPU->isChecked())
num+=26; num+=26;
if (checkBoxPL->isChecked()) if (checkBoxPL->isChecked())
@ -268,6 +231,9 @@ void CGenPwDialog::estimateQuality(){
if (checkBoxPS->isChecked()) if (checkBoxPS->isChecked())
num+=32; num+=32;
} }
else {
num=Edit_chars->text().length();
}
float bits = 0; float bits = 0;
if (num) if (num)
@ -354,7 +320,7 @@ QString CGenPwDialog::generatePasswordInternal(int length){
bool ensureEveryGroup = false; bool ensureEveryGroup = false;
QList<PwGroup> groupTable; QList<PwGroup> groupTable;
if(Radio_1->isChecked()){ if (tabCategory->currentIndex() == 0) {
if (Check_EveryGroup->isChecked()){ if (Check_EveryGroup->isChecked()){
if (checkBox1->isChecked()) groups++; if (checkBox1->isChecked()) groups++;
if (checkBox2->isChecked()) groups++; if (checkBox2->isChecked()) groups++;
@ -407,7 +373,7 @@ QString CGenPwDialog::generatePasswordInternal(int length){
else AddToAssoctable(assoctable,95,95,num); else AddToAssoctable(assoctable,95,95,num);
} }
} }
else{ else {
QString str=Edit_chars->text(); QString str=Edit_chars->text();
for(int i=0;i<str.length();i++){ for(int i=0;i<str.length();i++){
assoctable.append(str[i]); assoctable.append(str[i]);
@ -446,21 +412,20 @@ QString CGenPwDialog::generatePasswordInternal(int length){
void CGenPwDialog::setGenerateEnabled(){ void CGenPwDialog::setGenerateEnabled(){
bool enable; bool enable;
int index = tabCategory->currentIndex();
if (tabCategory->currentIndex()==0){ if (index == 0) {
if (Radio_1->isChecked()){ enable = checkBox1->isChecked() || checkBox2->isChecked() || checkBox3->isChecked() ||
enable = checkBox1->isChecked() || checkBox2->isChecked() || checkBox3->isChecked() || checkBox4->isChecked() || checkBox5->isChecked() || checkBox6->isChecked() ||
checkBox4->isChecked() || checkBox5->isChecked() || checkBox6->isChecked() || checkBox7->isChecked();
checkBox7->isChecked();
}
else{
enable = !Edit_chars->text().isEmpty();
}
} }
else{ else if (index == 1) {
enable = checkBoxPU->isChecked() || checkBoxPL->isChecked() || enable = checkBoxPU->isChecked() || checkBoxPL->isChecked() ||
checkBoxPN->isChecked() || checkBoxPS->isChecked(); checkBoxPN->isChecked() || checkBoxPS->isChecked();
} }
else {
enable = !Edit_chars->text().isEmpty();
}
ButtonGenerate->setEnabled(enable); ButtonGenerate->setEnabled(enable);
} }

@ -46,8 +46,6 @@ class CGenPwDialog : public QDialog, public Ui_GenPwDlg
private slots: private slots:
void OnGeneratePw(); void OnGeneratePw();
void OnRadio2StateChanged(bool);
void OnRadio1StateChanged(bool);
void OnCancel(); void OnCancel();
void OnAccept(); void OnAccept();
void estimateQuality(); void estimateQuality();

@ -1,88 +1,89 @@
<ui version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author>Tarek Saidi</author> <author>Tarek Saidi</author>
<class>EditEntryDialog</class> <class>EditEntryDialog</class>
<widget class="QDialog" name="EditEntryDialog" > <widget class="QDialog" name="EditEntryDialog">
<property name="geometry" > <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>494</width> <width>494</width>
<height>491</height> <height>490</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle">
<string>Edit Entry</string> <string>Edit Entry</string>
</property> </property>
<property name="sizeGripEnabled" > <property name="sizeGripEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="modal" > <property name="modal">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item rowspan="2" row="5" column="1" > <item row="5" column="1" rowspan="2">
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="1" column="1" > <item row="1" column="1">
<widget class="QToolButton" name="ButtonGenPw" > <widget class="QToolButton" name="ButtonGenPw">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" > <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize" > <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>23</height> <height>23</height>
</size> </size>
</property> </property>
<property name="maximumSize" > <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>23</height> <height>23</height>
</size> </size>
</property> </property>
<property name="text" > <property name="text">
<string>Ge&amp;n.</string> <string>Ge&amp;n.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0">
<widget class="QLineEdit" name="Edit_Password_w" > <widget class="QLineEdit" name="Edit_Password_w">
<property name="font" > <property name="font">
<font> <font>
<family>Serif</family> <family>Serif</family>
</font> </font>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item row="0" column="1">
<widget class="QToolButton" name="ButtonEchoMode" > <widget class="QToolButton" name="ButtonEchoMode">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" > <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize" > <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>23</height> <height>23</height>
</size> </size>
</property> </property>
<property name="maximumSize" > <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>23</height> <height>23</height>
</size> </size>
</property> </property>
<property name="iconSize" > <property name="iconSize">
<size> <size>
<width>16</width> <width>16</width>
<height>16</height> <height>16</height>
@ -90,9 +91,9 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" > <item row="0" column="0">
<widget class="QLineEdit" name="Edit_Password" > <widget class="QLineEdit" name="Edit_Password">
<property name="font" > <property name="font">
<font> <font>
<family>Serif</family> <family>Serif</family>
</font> </font>
@ -101,183 +102,183 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="7" column="0" > <item row="7" column="0">
<widget class="QLabel" name="textLabel9" > <widget class="QLabel" name="textLabel9">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Quality:</string> <string>Quality:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="0" > <item row="10" column="0">
<widget class="QLabel" name="textLabel12" > <widget class="QLabel" name="textLabel12">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Attachment:</string> <string>Attachment:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0">
<widget class="QLabel" name="textLabel4" > <widget class="QLabel" name="textLabel4">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Title:</string> <string>Title:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" > <item row="3" column="0">
<widget class="QLabel" name="textLabel5" > <widget class="QLabel" name="textLabel5">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Username:</string> <string>Username:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="0" > <item row="8" column="0">
<widget class="QLabel" name="textLabel10" > <widget class="QLabel" name="textLabel10">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Comment:</string> <string>Comment:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" > <item row="4" column="0">
<widget class="QLabel" name="textLabel7" > <widget class="QLabel" name="textLabel7">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>URL:</string> <string>URL:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0">
<widget class="QLabel" name="textLabel3" > <widget class="QLabel" name="textLabel3">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Group:</string> <string>Group:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1" > <item row="2" column="1">
<widget class="QLineEdit" name="Edit_Title" /> <widget class="QLineEdit" name="Edit_Title"/>
</item> </item>
<item row="3" column="1" > <item row="3" column="1">
<widget class="QLineEdit" name="Edit_UserName" /> <widget class="QLineEdit" name="Edit_UserName"/>
</item> </item>
<item row="6" column="0" > <item row="6" column="0">
<widget class="QLabel" name="textLabel8" > <widget class="QLabel" name="textLabel8">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Password Repet.:</string> <string>Repeat:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0" > <item row="5" column="0">
<widget class="QLabel" name="textLabel6" > <widget class="QLabel" name="textLabel6">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Password:</string> <string>Password:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="0" > <item row="9" column="0">
<widget class="QLabel" name="textLabel11" > <widget class="QLabel" name="textLabel11">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>Expires:</string> <string>Expires:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="1" > <item row="8" column="1">
<widget class="QTextEdit" name="Edit_Comment" > <widget class="QTextEdit" name="Edit_Comment">
<property name="minimumSize" > <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>40</height> <height>40</height>
</size> </size>
</property> </property>
<property name="tabChangesFocus" > <property name="tabChangesFocus">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="acceptRichText" > <property name="acceptRichText">
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0" colspan="2" > <item row="12" column="0" colspan="2">
<widget class="Line" name="line1" > <widget class="Line" name="line1">
<property name="frameShape" > <property name="frameShape">
<enum>QFrame::HLine</enum> <enum>QFrame::HLine</enum>
</property> </property>
<property name="frameShadow" > <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1" > <item row="10" column="1">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QLineEdit" name="Edit_Attachment" > <widget class="QLineEdit" name="Edit_Attachment">
<property name="enabled" > <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Fixed" hsizetype="Minimum" > <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -285,16 +286,16 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="ButtonOpenAttachment" > <widget class="QToolButton" name="ButtonOpenAttachment">
<property name="text" > <property name="text">
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon">
<iconset> <iconset>
<normaloff/> <normaloff/>
</iconset> </iconset>
</property> </property>
<property name="iconSize" > <property name="iconSize">
<size> <size>
<width>16</width> <width>16</width>
<height>16</height> <height>16</height>
@ -303,16 +304,16 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="ButtonSaveAttachment" > <widget class="QToolButton" name="ButtonSaveAttachment">
<property name="text" > <property name="text">
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon">
<iconset> <iconset>
<normaloff/> <normaloff/>
</iconset> </iconset>
</property> </property>
<property name="iconSize" > <property name="iconSize">
<size> <size>
<width>16</width> <width>16</width>
<height>16</height> <height>16</height>
@ -321,16 +322,16 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="ButtonDeleteAttachment" > <widget class="QToolButton" name="ButtonDeleteAttachment">
<property name="text" > <property name="text">
<string/> <string/>
</property> </property>
<property name="icon" > <property name="icon">
<iconset> <iconset>
<normaloff/> <normaloff/>
</iconset> </iconset>
</property> </property>
<property name="iconSize" > <property name="iconSize">
<size> <size>
<width>16</width> <width>16</width>
<height>16</height> <height>16</height>
@ -339,101 +340,101 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="Label_AttachmentSize" > <widget class="QLabel" name="Label_AttachmentSize">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Preferred" hsizetype="Maximum" > <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>%1</string> <string>%1</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="9" column="1" > <item row="9" column="1">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QDateTimeEdit" name="DateTime_Expire" /> <widget class="QDateTimeEdit" name="DateTime_Expire"/>
</item> </item>
<item> <item>
<widget class="QToolButton" name="ButtonExpirePresets" > <widget class="QToolButton" name="ButtonExpirePresets">
<property name="text" > <property name="text">
<string/> <string/>
</property> </property>
<property name="iconSize" > <property name="iconSize">
<size> <size>
<width>16</width> <width>16</width>
<height>16</height> <height>16</height>
</size> </size>
</property> </property>
<property name="popupMode" > <property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum> <enum>QToolButton::MenuButtonPopup</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="CheckBox_ExpiresNever" > <widget class="QCheckBox" name="CheckBox_ExpiresNever">
<property name="text" > <property name="text">
<string>Never</string> <string>Never</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="7" column="1" > <item row="7" column="1">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QProgressBar" name="Progress_Quali" > <widget class="QProgressBar" name="Progress_Quali">
<property name="minimumSize" > <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>14</height> <height>14</height>
</size> </size>
</property> </property>
<property name="maximumSize" > <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>14</height> <height>14</height>
</size> </size>
</property> </property>
<property name="textVisible" > <property name="textVisible">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="Label_Bits" > <widget class="QLabel" name="Label_Bits">
<property name="text" > <property name="text">
<string>%1 Bit</string> <string>%1 Bit</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="4" column="1" > <item row="4" column="1">
<widget class="QLineEdit" name="Edit_URL" /> <widget class="QLineEdit" name="Edit_URL"/>
</item> </item>
<item row="1" column="1" > <item row="1" column="1">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QComboBox" name="Combo_Group" > <widget class="QComboBox" name="Combo_Group">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" > <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -442,13 +443,13 @@
</item> </item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>100</width> <width>100</width>
<height>20</height> <height>20</height>
@ -457,18 +458,18 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="textLabel1" > <widget class="QLabel" name="textLabel1">
<property name="text" > <property name="text">
<string>Icon:</string> <string>Icon:</string>
</property> </property>
<property name="alignment" > <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="Button_Icons" > <widget class="QToolButton" name="Button_Icons">
<property name="iconSize" > <property name="iconSize">
<size> <size>
<width>16</width> <width>16</width>
<height>16</height> <height>16</height>
@ -478,25 +479,25 @@
</item> </item>
</layout> </layout>
</item> </item>
<item row="13" column="0" colspan="2" > <item row="13" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox" > <widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="standardButtons" > <property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" colspan="2" > <item row="0" column="0" colspan="2">
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Minimum</enum> <enum>QSizePolicy::Minimum</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>50</height> <height>50</height>
@ -506,7 +507,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11" /> <layoutdefault spacing="6" margin="11"/>
<tabstops> <tabstops>
<tabstop>Edit_Title</tabstop> <tabstop>Edit_Title</tabstop>
<tabstop>Edit_UserName</tabstop> <tabstop>Edit_UserName</tabstop>

@ -1,30 +1,31 @@
<ui version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GenPwDlg</class> <class>GenPwDlg</class>
<widget class="QDialog" name="GenPwDlg" > <widget class="QDialog" name="GenPwDlg">
<property name="geometry" > <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>460</width> <width>460</width>
<height>505</height> <height>432</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle">
<string>Password Generator</string> <string>Password Generator</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>442</width> <width>442</width>
<height>50</height> <height>50</height>
@ -33,44 +34,36 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QTabWidget" name="tabCategory" > <widget class="QTabWidget" name="tabCategory">
<property name="currentIndex" > <property name="currentIndex">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="tabRandom" > <widget class="QWidget" name="tabRandom">
<property name="geometry" > <attribute name="title">
<rect>
<x>0</x>
<y>0</y>
<width>438</width>
<height>243</height>
</rect>
</property>
<attribute name="title" >
<string>Random</string> <string>Random</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout" > <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QRadioButton" name="Radio_1" > <widget class="QLabel" name="label_2">
<property name="text" > <property name="text">
<string>Use follo&amp;wing character groups:</string> <string>Use following character groups:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>30</width> <width>30</width>
<height>20</height> <height>20</height>
@ -79,64 +72,64 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="1" column="0" > <item row="1" column="0">
<widget class="QCheckBox" name="checkBox2" > <widget class="QCheckBox" name="checkBox2">
<property name="text" > <property name="text">
<string>&amp;Lower Letters</string> <string>&amp;Lower Letters</string>
</property> </property>
<property name="checked" > <property name="checked">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1" > <item row="2" column="1">
<widget class="QCheckBox" name="checkBox7" > <widget class="QCheckBox" name="checkBox7">
<property name="text" > <property name="text">
<string>&amp;Underline</string> <string>&amp;Underline</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0">
<widget class="QCheckBox" name="checkBox3" > <widget class="QCheckBox" name="checkBox3">
<property name="text" > <property name="text">
<string>&amp;Numbers</string> <string>&amp;Numbers</string>
</property> </property>
<property name="checked" > <property name="checked">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1" > <item row="0" column="1">
<widget class="QCheckBox" name="checkBox5" > <widget class="QCheckBox" name="checkBox5">
<property name="text" > <property name="text">
<string>&amp;White Spaces</string> <string>&amp;White Spaces</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0" > <item row="0" column="0">
<widget class="QCheckBox" name="checkBox1" > <widget class="QCheckBox" name="checkBox1">
<property name="text" > <property name="text">
<string>&amp;Upper Letters</string> <string>&amp;Upper Letters</string>
</property> </property>
<property name="checked" > <property name="checked">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1" > <item row="1" column="1">
<widget class="QCheckBox" name="checkBox6" > <widget class="QCheckBox" name="checkBox6">
<property name="text" > <property name="text">
<string>&amp;Minus</string> <string>&amp;Minus</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2" > <item row="0" column="2">
<widget class="QCheckBox" name="checkBox4" > <widget class="QCheckBox" name="checkBox4">
<property name="text" > <property name="text">
<string>&amp;Special Characters</string> <string>&amp;Special Characters</string>
</property> </property>
</widget> </widget>
@ -146,118 +139,68 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QRadioButton" name="Radio_2" > <widget class="QCheckBox" name="Check_ExcludeLookAlike">
<property name="text" > <property name="text">
<string>Use &amp;only following characters:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType" >
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLineEdit" name="Edit_chars" >
<property name="font" >
<font>
<family>Serif</family>
</font>
</property>
<property name="maxLength" >
<number>255</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="Check_ExcludeLookAlike" >
<property name="text" >
<string>Exclude look-alike characters</string> <string>Exclude look-alike characters</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="Check_EveryGroup" > <widget class="QCheckBox" name="Check_EveryGroup">
<property name="text" > <property name="text">
<string>Ensure that password contains characters from every group</string> <string>Ensure that password contains characters from every group</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabPronounceable" > <widget class="QWidget" name="tabPronounceable">
<property name="geometry" > <attribute name="title">
<rect>
<x>0</x>
<y>0</y>
<width>438</width>
<height>243</height>
</rect>
</property>
<attribute name="title" >
<string>Pronounceable</string> <string>Pronounceable</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_2" > <layout class="QVBoxLayout" name="verticalLayout_2">
<item> <item>
<spacer name="verticalSpacer_2" > <spacer name="verticalSpacer_2">
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>60</height> <height>1</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_2" > <layout class="QGridLayout" name="gridLayout_2">
<property name="verticalSpacing" > <property name="verticalSpacing">
<number>12</number> <number>12</number>
</property> </property>
<item row="0" column="0" > <item row="0" column="0">
<widget class="QCheckBox" name="checkBoxPL" > <widget class="QCheckBox" name="checkBoxPL">
<property name="text" > <property name="text">
<string>Lower Letters</string> <string>Lower Letters</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0">
<widget class="QCheckBox" name="checkBoxPU" > <widget class="QCheckBox" name="checkBoxPU">
<property name="text" > <property name="text">
<string>Upper Letters</string> <string>Upper Letters</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0" > <item row="2" column="0">
<widget class="QCheckBox" name="checkBoxPN" > <widget class="QCheckBox" name="checkBoxPN">
<property name="text" > <property name="text">
<string>Numbers</string> <string>Numbers</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" > <item row="3" column="0">
<widget class="QCheckBox" name="checkBoxPS" > <widget class="QCheckBox" name="checkBoxPS">
<property name="text" > <property name="text">
<string>Special Characters</string> <string>Special Characters</string>
</property> </property>
</widget> </widget>
@ -265,14 +208,66 @@
</layout> </layout>
</item> </item>
<item> <item>
<spacer name="verticalSpacer" > <spacer name="verticalSpacer">
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabCustom">
<attribute name="title">
<string>Custom</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>51</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Use the following characters:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="Edit_chars">
<property name="font">
<font>
<family>Serif</family>
</font>
</property>
<property name="maxLength">
<number>255</number>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>60</height> <height>51</height>
</size> </size>
</property> </property>
</spacer> </spacer>
@ -283,13 +278,13 @@
</item> </item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>5</height> <height>5</height>
@ -298,48 +293,48 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="groupBox1" > <widget class="QGroupBox" name="groupBox1">
<property name="title" > <property name="title">
<string>Options</string> <string>Options</string>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="textLabel1" > <widget class="QLabel" name="textLabel1">
<property name="text" > <property name="text">
<string>Length:</string> <string>Length:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QSpinBox" name="Spin_Num" > <widget class="QSpinBox" name="Spin_Num">
<property name="minimum" > <property name="minimum">
<number>1</number> <number>1</number>
</property> </property>
<property name="maximum" > <property name="maximum">
<number>10000</number> <number>10000</number>
</property> </property>
<property name="value" > <property name="value">
<number>20</number> <number>20</number>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>10</width> <width>10</width>
<height>1</height> <height>1</height>
@ -348,21 +343,21 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="textLabel5" > <widget class="QLabel" name="textLabel5">
<property name="text" > <property name="text">
<string>Quality:</string> <string>Quality:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QProgressBar" name="Progress_Quali" > <widget class="QProgressBar" name="Progress_Quali">
<property name="maximum" > <property name="maximum">
<number>128</number> <number>128</number>
</property> </property>
<property name="value" > <property name="value">
<number>0</number> <number>0</number>
</property> </property>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
@ -370,29 +365,29 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QCheckBox" name="Check_CollectEntropy" > <widget class="QCheckBox" name="Check_CollectEntropy">
<property name="text" > <property name="text">
<string>Enable entropy collection</string> <string>Enable entropy collection</string>
</property> </property>
<property name="checked" > <property name="checked">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Fixed</enum> <enum>QSizePolicy::Fixed</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>10</width> <width>10</width>
<height>20</height> <height>20</height>
@ -401,18 +396,18 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="Check_CollectOncePerSession" > <widget class="QCheckBox" name="Check_CollectOncePerSession">
<property name="text" > <property name="text">
<string>Collect only once per session</string> <string>Collect only once per session</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0" > <property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
@ -426,20 +421,20 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QLabel" name="textLabel4" > <widget class="QLabel" name="textLabel4">
<property name="text" > <property name="text">
<string>New Password:</string> <string>New Password:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLineEdit" name="Edit_dest" > <widget class="QLineEdit" name="Edit_dest">
<property name="font" > <property name="font">
<font> <font>
<family>Serif</family> <family>Serif</family>
</font> </font>
@ -447,15 +442,15 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QToolButton" name="ButtonChangeEchoMode" > <widget class="QToolButton" name="ButtonChangeEchoMode">
<property name="text" > <property name="text">
<string/> <string/>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="ButtonGenerate" > <widget class="QPushButton" name="ButtonGenerate">
<property name="text" > <property name="text">
<string>Generate</string> <string>Generate</string>
</property> </property>
</widget> </widget>
@ -463,34 +458,33 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="Line" name="line3" > <widget class="Line" name="line3">
<property name="frameShape" > <property name="frameShape">
<enum>QFrame::HLine</enum> <enum>QFrame::HLine</enum>
</property> </property>
<property name="frameShadow" > <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QDialogButtonBox" name="DialogButtons" > <widget class="QDialogButtonBox" name="DialogButtons">
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="standardButtons" > <property name="standardButtons">
<set>QDialogButtonBox::NoButton</set> <set>QDialogButtonBox::NoButton</set>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<layoutdefault spacing="6" margin="11" /> <layoutdefault spacing="6" margin="11"/>
<tabstops> <tabstops>
<tabstop>tabCategory</tabstop> <tabstop>tabCategory</tabstop>
<tabstop>Radio_1</tabstop>
<tabstop>checkBox1</tabstop> <tabstop>checkBox1</tabstop>
<tabstop>checkBox2</tabstop> <tabstop>checkBox2</tabstop>
<tabstop>checkBox3</tabstop> <tabstop>checkBox3</tabstop>
@ -498,8 +492,6 @@
<tabstop>checkBox6</tabstop> <tabstop>checkBox6</tabstop>
<tabstop>checkBox7</tabstop> <tabstop>checkBox7</tabstop>
<tabstop>checkBox4</tabstop> <tabstop>checkBox4</tabstop>
<tabstop>Radio_2</tabstop>
<tabstop>Edit_chars</tabstop>
<tabstop>Check_ExcludeLookAlike</tabstop> <tabstop>Check_ExcludeLookAlike</tabstop>
<tabstop>Check_EveryGroup</tabstop> <tabstop>Check_EveryGroup</tabstop>
<tabstop>Spin_Num</tabstop> <tabstop>Spin_Num</tabstop>

@ -51,8 +51,6 @@ int main(int argc, char **argv)
{ {
setlocale(LC_CTYPE, ""); setlocale(LC_CTYPE, "");
QT_REQUIRE_VERSION(argc, argv, "4.3.0");
#if defined(Q_WS_X11) && defined(AUTOTYPE) #if defined(Q_WS_X11) && defined(AUTOTYPE)
QApplication* app = new KeepassApplication(argc,argv); QApplication* app = new KeepassApplication(argc,argv);
#else #else

@ -714,23 +714,27 @@ void KeepassMainWindow::updateDetailView(){
QString templ=DetailViewTemplate; QString templ=DetailViewTemplate;
IEntryHandle* entry=((EntryViewItem*)(EntryView->selectedItems()[0]))->EntryHandle; IEntryHandle* entry=((EntryViewItem*)(EntryView->selectedItems()[0]))->EntryHandle;
templ.replace("%group%",entry->group()->title()); templ.replace("%group%", Qt::escape(entry->group()->title()));
templ.replace("%title%",entry->title()); templ.replace("%title%", Qt::escape(entry->title()));
if(config->hideUsernames())templ.replace("%username%","****"); if (config->hideUsernames())
else templ.replace("%username%",entry->username()); templ.replace("%username%","****");
if(!config->hidePasswords()){ else
templ.replace("%username%", Qt::escape(entry->username()));
if (!config->hidePasswords()) {
SecString password=entry->password(); SecString password=entry->password();
password.unlock(); password.unlock();
templ.replace("%password%",password.string()); templ.replace("%password%", Qt::escape(password.string()));
}
else {
templ.replace("%password%","****");
} }
else templ.replace("%password%","****"); templ.replace("%url%", Qt::escape(entry->url()));
templ.replace("%url%",entry->url()); templ.replace("%creation%", Qt::escape(entry->creation().toString(Qt::SystemLocaleDate)));
templ.replace("%creation%",entry->creation().toString(Qt::SystemLocaleDate)); templ.replace("%lastmod%", Qt::escape(entry->lastMod().toString(Qt::SystemLocaleDate)));
templ.replace("%lastmod%",entry->lastMod().toString(Qt::SystemLocaleDate)); templ.replace("%lastaccess%", Qt::escape(entry->lastAccess().toString(Qt::SystemLocaleDate)));
templ.replace("%lastaccess%",entry->lastAccess().toString(Qt::SystemLocaleDate)); templ.replace("%expire%", Qt::escape(entry->expire().toString(Qt::SystemLocaleDate)));
templ.replace("%expire%",entry->expire().toString(Qt::SystemLocaleDate)); templ.replace("%comment%", Qt::escape(entry->comment()).replace("\n","<br/>"));
templ.replace("%comment%",entry->comment().replace("\n","<br/>")); templ.replace("%attachment%", Qt::escape(entry->binaryDesc()));
templ.replace("%attachment%",entry->binaryDesc());
if(entry->expire()!=Date_Never){ if(entry->expire()!=Date_Never){
int secs=QDateTime::currentDateTime().secsTo(entry->expire()); int secs=QDateTime::currentDateTime().secsTo(entry->expire());