mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-14 15:15:04 -04:00
Downcast all qtsizetype to UINT32 manually, apply consistent identation
This commit is contained in:
parent
10e2e60183
commit
4006954bc1
25 changed files with 3398 additions and 3398 deletions
|
@ -1,15 +1,15 @@
|
|||
/* fssops.cpp
|
||||
|
||||
Copyright (c) 2015, Nikolaj Schlej. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
*/
|
||||
|
||||
Copyright (c) 2015, Nikolaj Schlej. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
*/
|
||||
|
||||
#include "ffsops.h"
|
||||
#include "ffs.h"
|
||||
|
@ -20,10 +20,10 @@ USTATUS FfsOperations::extract(const UModelIndex & index, UString & name, UByteA
|
|||
// Sanity check
|
||||
if (!index.isValid())
|
||||
return U_INVALID_PARAMETER;
|
||||
|
||||
|
||||
// Default name
|
||||
name = uniqueItemName(index);
|
||||
|
||||
|
||||
// Get extracted data
|
||||
if (mode == EXTRACT_MODE_AS_IS) {
|
||||
// Extract as is, with header body and tail
|
||||
|
@ -45,18 +45,18 @@ USTATUS FfsOperations::extract(const UModelIndex & index, UString & name, UByteA
|
|||
}
|
||||
else
|
||||
return U_UNKNOWN_EXTRACT_MODE;
|
||||
|
||||
|
||||
return U_SUCCESS;
|
||||
}
|
||||
|
||||
USTATUS FfsOperations::replace(const UModelIndex & index, UByteArray & data, const UINT8 mode)
|
||||
{
|
||||
U_UNUSED_PARAMETER(data);
|
||||
|
||||
|
||||
// Sanity check
|
||||
if (!index.isValid())
|
||||
return U_INVALID_PARAMETER;
|
||||
|
||||
|
||||
if (mode == REPLACE_MODE_AS_IS) {
|
||||
return U_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ USTATUS FfsOperations::replace(const UModelIndex & index, UByteArray & data, con
|
|||
return U_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
return U_UNKNOWN_REPLACE_MODE;
|
||||
return U_UNKNOWN_REPLACE_MODE;
|
||||
}
|
||||
|
||||
USTATUS FfsOperations::remove(const UModelIndex & index)
|
||||
|
@ -72,10 +72,10 @@ USTATUS FfsOperations::remove(const UModelIndex & index)
|
|||
// Sanity check
|
||||
if (!index.isValid())
|
||||
return U_INVALID_PARAMETER;
|
||||
|
||||
|
||||
// Set remove action
|
||||
model->setAction(index, Actions::Remove);
|
||||
|
||||
|
||||
return U_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -84,20 +84,20 @@ USTATUS FfsOperations::rebuild(const UModelIndex & index)
|
|||
// Sanity check
|
||||
if (!index.isValid())
|
||||
return U_INVALID_PARAMETER;
|
||||
|
||||
|
||||
// On insert action, set insert action for children
|
||||
//if (action == Actions::Insert)
|
||||
// for (int i = 0; i < item->childCount(); i++)
|
||||
// setAction(index.child(i, 0), Actions::Insert);
|
||||
|
||||
|
||||
// Set rebuild action
|
||||
model->setAction(index, Actions::Rebuild);
|
||||
|
||||
|
||||
// Rebuild parent, if it has no action now
|
||||
UModelIndex parent = index.parent();
|
||||
if (parent.isValid() && model->type(parent) != Types::Root
|
||||
&& model->action(parent) == Actions::NoAction)
|
||||
rebuild(parent);
|
||||
rebuild(parent);
|
||||
|
||||
return U_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue