mirror of
https://github.com/martravi/wiiqt6.git
synced 2024-11-26 06:34:21 +01:00
* ohneschwanzenegger: fix possible crash, use const reference when installing shared contents
git-svn-id: http://wiiqt.googlecode.com/svn/trunk@88 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
parent
8a683c7078
commit
04094e8e54
@ -174,12 +174,12 @@ void MainWindow::NusIsDone()
|
|||||||
{
|
{
|
||||||
nandDirty = true;
|
nandDirty = true;
|
||||||
UpdateTree();
|
UpdateTree();
|
||||||
|
ShowMessage( tr( "Saved setting.txt" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//nand.Delete( "/title/00000001/00000002/content/title.tmd" );
|
|
||||||
if( nandDirty )
|
if( nandDirty )
|
||||||
{
|
{
|
||||||
if( !FlushNand() )
|
if( !FlushNand() )
|
||||||
@ -547,7 +547,10 @@ bool MainWindow::UpdateTree()
|
|||||||
{
|
{
|
||||||
//set up the tree so we know what all is in the nand without asking for it every time
|
//set up the tree so we know what all is in the nand without asking for it every time
|
||||||
if( root )
|
if( root )
|
||||||
|
{
|
||||||
delete root;
|
delete root;
|
||||||
|
root = NULL;
|
||||||
|
}
|
||||||
QTreeWidgetItem *r = nand.GetTree();
|
QTreeWidgetItem *r = nand.GetTree();
|
||||||
if( r->childCount() != 1 || r->child( 0 )->text( 0 ) != "/" )
|
if( r->childCount() != 1 || r->child( 0 )->text( 0 ) != "/" )
|
||||||
{
|
{
|
||||||
@ -575,7 +578,7 @@ quint16 MainWindow::CreateIfNeeded( const QString &path, quint32 uid, quint16 gi
|
|||||||
return item->text( 1 ).toInt();
|
return item->text( 1 ).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::InstallSharedContent( const QByteArray stuff, const QByteArray hash )
|
bool MainWindow::InstallSharedContent( const QByteArray &stuff, const QByteArray &hash )
|
||||||
{
|
{
|
||||||
//qDebug() << "MainWindow::InstallSharedContent";
|
//qDebug() << "MainWindow::InstallSharedContent";
|
||||||
QByteArray h;
|
QByteArray h;
|
||||||
|
@ -44,7 +44,7 @@ private:
|
|||||||
|
|
||||||
bool InstallNUSItem( NusJob job );
|
bool InstallNUSItem( NusJob job );
|
||||||
quint16 CreateIfNeeded( const QString &path, quint32 uid, quint16 gid, quint8 attr, quint8 user_perm, quint8 group_perm, quint8 other_perm );
|
quint16 CreateIfNeeded( const QString &path, quint32 uid, quint16 gid, quint8 attr, quint8 user_perm, quint8 group_perm, quint8 other_perm );
|
||||||
bool InstallSharedContent( const QByteArray stuff, const QByteArray hash = QByteArray() );
|
bool InstallSharedContent( const QByteArray &stuff, const QByteArray &hash = QByteArray() );
|
||||||
|
|
||||||
void SaveSettings();
|
void SaveSettings();
|
||||||
void LoadSettings();
|
void LoadSettings();
|
||||||
|
Loading…
Reference in New Issue
Block a user