From 2a7b6e242fefe6d653d4634ff1832deddb72ecb2 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 20 Dec 2006 23:51:07 +0100 Subject: [PATCH] fix x509name list in NewX509.ui make Extensions readonly --- lib/db_base.h | 4 + lib/db_temp.cpp | 2 +- lib/db_x509super.h | 2 - ui/CertDetail.ui | 738 ++++++++++++++++++++++++++++---------------- widgets/NewX509.cpp | 11 +- 5 files changed, 480 insertions(+), 277 deletions(-) diff --git a/lib/db_base.h b/lib/db_base.h index a4f9c6b8..1cf48d1f 100644 --- a/lib/db_base.h +++ b/lib/db_base.h @@ -65,6 +65,7 @@ class MainWindow; class QContextMenuEvent; class XcaTreeView; +class NewX509; class db_base: public QAbstractItemModel { @@ -130,6 +131,9 @@ class db_base: public QAbstractItemModel void edit(); virtual void showItem(); virtual void store(){}; + + signals: + void connNewX509(NewX509 *dlg); }; #endif diff --git a/lib/db_temp.cpp b/lib/db_temp.cpp index 7cdd3dff..01cb2cb9 100644 --- a/lib/db_temp.cpp +++ b/lib/db_temp.cpp @@ -74,7 +74,7 @@ pki_base *db_temp::newPKI(){ bool db_temp::runTempDlg(pki_temp *temp) { NewX509 *dlg = new NewX509(mainwin); - mainwin->connNewX509(dlg); + emit connNewX509(dlg); dlg->setTemp(temp); dlg->fromTemplate(temp); diff --git a/lib/db_x509super.h b/lib/db_x509super.h index c041e87a..6a8706da 100644 --- a/lib/db_x509super.h +++ b/lib/db_x509super.h @@ -68,8 +68,6 @@ class db_x509super: public db_base public slots: void delKey(pki_key *delkey); void newKey(pki_key *newKey); - signals: - void connNewX509(NewX509 *dlg); }; diff --git a/ui/CertDetail.ui b/ui/CertDetail.ui index 199e7d37..1a416001 100644 --- a/ui/CertDetail.ui +++ b/ui/CertDetail.ui @@ -1,7 +1,4 @@ - - - CertDetail @@ -87,6 +84,9 @@ + + 0 + S&tatus @@ -184,265 +184,469 @@ - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - 231 - 231 - 231 - + + + + 128 + 128 + 128 + + + + + + + 192 + 192 + 192 + + + + + + + 255 + 255 + 255 + + + + + + + 223 + 223 + 223 + + + + + + + 128 + 128 + 128 + + + + + + + 160 + 160 + 164 + + + + + + + 128 + 128 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 192 + 192 + 192 + + + + + + + 192 + 192 + 192 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 255 + + + + + + + 255 + 0 + 255 + + + + + + + 231 + 231 + 231 + + + - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - 231 - 231 - 231 - + + + + 128 + 128 + 128 + + + + + + + 192 + 192 + 192 + + + + + + + 255 + 255 + 255 + + + + + + + 223 + 223 + 223 + + + + + + + 128 + 128 + 128 + + + + + + + 160 + 160 + 164 + + + + + + + 128 + 128 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 192 + 192 + 192 + + + + + + + 192 + 192 + 192 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 255 + + + + + + + 255 + 0 + 255 + + + + + + + 231 + 231 + 231 + + + - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 255 - 255 - 255 - - - 223 - 223 - 223 - - - 128 - 128 - 128 - - - 160 - 160 - 164 - - - 128 - 128 - 128 - - - 255 - 255 - 255 - - - 128 - 128 - 128 - - - 192 - 192 - 192 - - - 192 - 192 - 192 - - - 0 - 0 - 0 - - - 0 - 0 - 128 - - - 255 - 255 - 255 - - - 0 - 0 - 255 - - - 255 - 0 - 255 - - - 231 - 231 - 231 - + + + + 128 + 128 + 128 + + + + + + + 192 + 192 + 192 + + + + + + + 255 + 255 + 255 + + + + + + + 223 + 223 + 223 + + + + + + + 128 + 128 + 128 + + + + + + + 160 + 160 + 164 + + + + + + + 128 + 128 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 128 + 128 + 128 + + + + + + + 192 + 192 + 192 + + + + + + + 192 + 192 + 192 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 255 + + + + + + + 255 + 0 + 255 + + + + + + + 231 + 231 + 231 + + + @@ -681,7 +885,7 @@ 6 - + @@ -697,7 +901,7 @@ 6 - + @@ -713,14 +917,18 @@ 6 - + + + true + + - + @@ -775,21 +983,17 @@ - ClickLabel QLabel
widgets/clicklabel.h
- 0 -
DistName - + QWidget
widgets/distname.h
1 -
diff --git a/widgets/NewX509.cpp b/widgets/NewX509.cpp index 3d5f6c4c..7662cf69 100644 --- a/widgets/NewX509.cpp +++ b/widgets/NewX509.cpp @@ -207,13 +207,6 @@ void NewX509::setTemp(pki_temp *temp) validityBox->setEnabled(false); setImage(MainWindow::tempImg); -#if 1 - QStringList sl; - sl << "Typef" << "Contentf"; - printf("Setaaaaaa Ext DN list\n"); - extDNlist->setColumnCount(2); - extDNlist->setHorizontalHeaderLabels(sl); -#endif pt = tmpl; } @@ -539,7 +532,11 @@ x509name NewX509::getX509name() void NewX509::setX509name(const x509name &n) { int j; +#if QT_VERSION >= 0x040200 + extDNlist->clearContents(); +#else extDNlist->clear(); +#endif for ( j = 0; jsetText(""); }