mirror of
https://github.com/martravi/wiiqt.git
synced 2024-11-22 00:59:18 +01:00
* ohneschwanzenegger: fix possible crash, use const reference when installing shared contents
This commit is contained in:
parent
32cf8113e4
commit
15d6ba4344
@ -174,12 +174,12 @@ void MainWindow::NusIsDone()
|
||||
{
|
||||
nandDirty = true;
|
||||
UpdateTree();
|
||||
ShowMessage( tr( "Saved setting.txt" ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//nand.Delete( "/title/00000001/00000002/content/title.tmd" );
|
||||
if( nandDirty )
|
||||
{
|
||||
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
|
||||
if( root )
|
||||
{
|
||||
delete root;
|
||||
root = NULL;
|
||||
}
|
||||
QTreeWidgetItem *r = nand.GetTree();
|
||||
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();
|
||||
}
|
||||
|
||||
bool MainWindow::InstallSharedContent( const QByteArray stuff, const QByteArray hash )
|
||||
bool MainWindow::InstallSharedContent( const QByteArray &stuff, const QByteArray &hash )
|
||||
{
|
||||
//qDebug() << "MainWindow::InstallSharedContent";
|
||||
QByteArray h;
|
||||
|
@ -44,7 +44,7 @@ private:
|
||||
|
||||
bool InstallNUSItem( NusJob job );
|
||||
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 LoadSettings();
|
||||
|
Loading…
Reference in New Issue
Block a user