On Tue, 23 Jan 2007 02:31:11 +0100, Jon Keating <[EMAIL PROTECTED]>
wrote:
Please do not ever change tabs/spaces on an entire file when you
commit to SVN. It makes the diff completly unreadable and
unreviewable. Can you please provide a diff of the changes you did
without the space changes so other people can see what actually has
changed?
Jon
I apologize for the unreadable diff. As the indentation of the function
varied a bit, I fixed the indentation in my working copy but I didn't
think of how the commited diff would look.
In the future if I do any such large code formating changes I will make it
a separate commit that doesn't have any code changes.
I assumed that you ment r4824 and not r4825 as the later one had only a
few single lines modified.
Below is a diff with whitspaces and formating restored to the previous
state.
/Anders
Index: qt-gui_qt4/src/adduserdlg.cpp
===================================================================
--- qt-gui_qt4/src/adduserdlg.cpp (revision 4823)
+++ qt-gui_qt4/src/adduserdlg.cpp (working copy)
@@ -19,41 +19,32 @@
#include "config.h"
-#include <Qt/qvalidator.h>
-#include <Qt/qlabel.h>
-#include <Qt/qlineedit.h>
-#include <Qt/qcheckbox.h>
-#include <Qt/qpushbutton.h>
-#include <Qt/qlayout.h>
-#include <Qt/q3frame.h>
-#include <Qt/qcombobox.h>
+#include <cstring>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QCheckBox>
+#include <QtGui/QPushButton>
+#include <QtGui/QHBoxLayout>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QComboBox>
+
#include "adduserdlg.h"
#include "licq_icqd.h"
-//TODO Add a drop down list of the avaialable protocols
-// that a user may be added for
+
AddUserDlg::AddUserDlg(CICQDaemon *s, const char* szId, unsigned long
PPID,
QWidget *parent)
- : LicqDialog(parent, "AddUserDialog")
+ : LicqDialog(parent, "AddUserDialog", false, Qt::WindowTitleHint |
Qt::WindowSystemMenuHint)
{
server = s;
- QBoxLayout *lay = new QBoxLayout(this, QBoxLayout::Down, 8);
- Q3Frame *frmProtocol = new Q3Frame(this);
- Q3Frame *frmUin = new Q3Frame(this);
- Q3Frame *frmBtn = new Q3Frame(this);
- lay->addWidget(frmProtocol);
- lay->addWidget(frmUin);
- lay->addSpacing(5);
- lay->addStretch();
- lay->addWidget(frmBtn);
-
- QBoxLayout *layProtocol = new QBoxLayout(frmProtocol,
QBoxLayout::LeftToRight);
- lblProtocol = new QLabel(tr("Protocol:"), frmProtocol);
- cmbProtocol = new QComboBox(frmProtocol);
+ QHBoxLayout *layProtocol = new QHBoxLayout();
+ lblProtocol = new QLabel(tr("&Protocol:"));
+ cmbProtocol = new QComboBox();
layProtocol->addWidget(lblProtocol);
+ lblProtocol->setBuddy(cmbProtocol);
layProtocol->addWidget(cmbProtocol);
// Fill the combo list now
@@ -69,22 +60,35 @@
}
cmbProtocol->setCurrentItem(ppidIndex);
- QBoxLayout *layUin = new QBoxLayout(frmUin,
QBoxLayout::LeftToRight);
- lblUin = new QLabel(tr("New User ID:"), frmUin);
- edtUin = new QLineEdit(frmUin);
+ QHBoxLayout *layUin = new QHBoxLayout();
+ lblUin = new QLabel(tr("&New User ID:"));
+ edtUin = new QLineEdit();
+ lblUin->setBuddy(edtUin);
layUin->addWidget(lblUin);
layUin->addWidget(edtUin);
if (szId != 0) edtUin->setText(szId);
- QBoxLayout *layBtn = new QBoxLayout(frmBtn, QBoxLayout::LeftToRight);
- btnOk = new QPushButton(tr("&Ok"), frmBtn);
- btnCancel = new QPushButton(tr("&Cancel"), frmBtn);
- layBtn->addStretch();
- layBtn->addWidget(btnOk);
- layBtn->addSpacing(20);
- layBtn->addWidget(btnCancel);
+ // Buttons
+ QHBoxLayout *layButtons = new QHBoxLayout();
+ btnOk = new QPushButton(tr("&Ok"));
+ btnOk->setDefault(true);
+ btnCancel = new QPushButton(tr("&Cancel"));
+ layButtons->addStretch(1);
+ layButtons->addWidget(btnOk);
+ layButtons->addSpacing(20);
+ layButtons->addWidget(btnCancel);
+
+
+ // Main dialog layout
+ QVBoxLayout *layDialog = new QVBoxLayout(this);
+ layDialog->addLayout(layProtocol);
+ layDialog->addLayout(layUin);
+ layDialog->addSpacing(5);
+ layDialog->addStretch(1);
+ layDialog->addLayout(layButtons);
+
setCaption(tr("Licq - Add User"));
connect (btnOk, SIGNAL(clicked()), SLOT(ok()) );
connect (edtUin, SIGNAL(returnPressed()), SLOT(ok()) );
Index: qt-gui_qt4/src/adduserdlg.h
===================================================================
--- qt-gui_qt4/src/adduserdlg.h (revision 4823)
+++ qt-gui_qt4/src/adduserdlg.h (working copy)
@@ -21,17 +21,17 @@
#define ADDUSERDLG_H
#include "licqdialog.h"
-//Added by qt3to4:
-#include <QtGui/QLabel>
-class QPushButton;
-class QLabel;
-class QLineEdit;
class QCheckBox;
class QComboBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QWidget;
class CICQDaemon;