Changed: Code formatting

This commit is contained in:
kervala 2014-09-05 15:42:53 +02:00
parent f8d68c0537
commit 32ff8cc793
5 changed files with 45 additions and 33 deletions

View file

@ -147,7 +147,6 @@ namespace NLMISC
bool DebugNeedAssert;
bool NoAssert;
bool AlreadyCreateSharedAmongThreads;
};
/** This class implements the context interface for the a library module.
@ -184,6 +183,7 @@ namespace NLMISC
virtual void setNoAssert(bool noAssert);
virtual bool getAlreadyCreateSharedAmongThreads();
virtual void setAlreadyCreateSharedAmongThreads(bool b);
private:
/// Pointer to the application context.
INelContext *_ApplicationContext;

View file

@ -543,14 +543,17 @@ ColorPickerPopup::ColorPickerPopup(int width, bool withColorDialog,
setMouseTracking(true);
cols = width;
if (withColorDialog) {
moreButton = new ColorPickerButton(this);
moreButton->setFixedWidth(24);
moreButton->setFixedHeight(21);
moreButton->setFrameRect(QRect(2, 2, 20, 17));
connect(moreButton, SIGNAL(clicked()), SLOT(getColorFromDialog()));
} else {
moreButton = 0;
if (withColorDialog)
{
moreButton = new ColorPickerButton(this);
moreButton->setFixedWidth(24);
moreButton->setFixedHeight(21);
moreButton->setFrameRect(QRect(2, 2, 20, 17));
connect(moreButton, SIGNAL(clicked()), SLOT(getColorFromDialog()));
}
else
{
moreButton = 0;
}
eventLoop = 0;
@ -1059,15 +1062,20 @@ void ColorPickerButton::mouseReleaseEvent(QMouseEvent *)
void ColorPickerButton::keyPressEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Up
|| e->key() == Qt::Key_Down
|| e->key() == Qt::Key_Left
|| e->key() == Qt::Key_Right) {
qApp->sendEvent(parent(), e);
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) {
setFrameShadow(Sunken);
update();
} else {
QFrame::keyPressEvent(e);
|| e->key() == Qt::Key_Down
|| e->key() == Qt::Key_Left
|| e->key() == Qt::Key_Right)
{
qApp->sendEvent(parent(), e);
}
else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return)
{
setFrameShadow(Sunken);
update();
}
else
{
QFrame::keyPressEvent(e);
}
}
@ -1077,16 +1085,21 @@ void ColorPickerButton::keyPressEvent(QKeyEvent *e)
void ColorPickerButton::keyReleaseEvent(QKeyEvent *e)
{
if (e->key() == Qt::Key_Up
|| e->key() == Qt::Key_Down
|| e->key() == Qt::Key_Left
|| e->key() == Qt::Key_Right) {
qApp->sendEvent(parent(), e);
} else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return) {
setFrameShadow(Raised);
repaint();
emit clicked();
} else {
QFrame::keyReleaseEvent(e);
|| e->key() == Qt::Key_Down
|| e->key() == Qt::Key_Left
|| e->key() == Qt::Key_Right)
{
qApp->sendEvent(parent(), e);
}
else if (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Space || e->key() == Qt::Key_Return)
{
setFrameShadow(Raised);
repaint();
emit clicked();
}
else
{
QFrame::keyReleaseEvent(e);
}
}

View file

@ -1511,8 +1511,6 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r
}
}
// _D3D->CreateDevice (adapter, _Rasterizer, _HWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &parameters, &_DeviceInterface);
// Check some caps
@ -2661,7 +2659,8 @@ bool CDriverD3D::reset (const GfxMode& mode)
#ifndef NL_NO_ASM
CFpuRestorer fpuRestorer; // fpu control word is changed by "Reset"
#endif
if (_Rasterizer!=D3DDEVTYPE_REF) {
if (_Rasterizer!=D3DDEVTYPE_REF)
{
HRESULT hr = _DeviceInterface->Reset (&parameters);
if (hr != D3D_OK)
{

View file

@ -75,7 +75,7 @@ INelContext::~INelContext()
void INelContext::contextReady()
void INelContext::contextReady()
{
// Register the NeL Context
// This assert doesn't work for Linux due to ELF symbol relocation