Fix warnings in gcc 4.3

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=887192
This commit is contained in:
Volker Lanz 2008-11-21 12:28:39 +00:00
parent e8ac4ee721
commit d611536684
6 changed files with 11 additions and 10 deletions

View File

@ -209,7 +209,7 @@ qint32 PartitionNode::highestMountedChild() const
bool PartitionNode::isChildMounted() const
{
foreach (const Partition* child, children())
if (child->isMounted() || child->hasChildren() && child->isChildMounted())
if (child->isMounted() || (child->hasChildren() && child->isChildMounted()))
return true;
return false;

View File

@ -119,7 +119,8 @@ void PartWidgetBase::positionChildren(const QWidget* destWidget, const Partition
childrenWidth.append(partitions[i]->length() * destWidgetWidth / totalLength);
// now go level the widths as long as required
while (levelChildrenWidths(childrenWidth, destWidgetWidth));
while (levelChildrenWidths(childrenWidth, destWidgetWidth))
;
// move the children to their positions and resize them
for (int i = 0, x = borderWidth(); i < widgets.size(); i++)

View File

@ -227,7 +227,7 @@ void ProgressDialog::updateReport(bool force)
// (1) If the widget isn't visible, don't update.
// (2) Also don't update if the last update was n msecs ago, BUT
// (3) DO update if we're being forced to.
if (force || detailsWidget().isVisible() && time().elapsed() - lastReportUpdate() > 2000)
if (force || (detailsWidget().isVisible() && time().elapsed() - lastReportUpdate() > 2000))
{
detailsWidget().editReport().setHtml("<html><body>" + report().toHtml() + "</body></html>");
detailsWidget().editReport().moveCursor(QTextCursor::End);

View File

@ -114,7 +114,7 @@ bool CopyOperation::execute(Report& parent)
Report* report = parent.newChild(description());
// check the source first
if (rval = checkSourceJob()->run(*report))
if ((rval = checkSourceJob()->run(*report)))
{
// At this point, if the target partition is to be created and not overwritten, it
// will still have the wrong device path (the one of the source device). We need
@ -138,10 +138,10 @@ bool CopyOperation::execute(Report& parent)
}
// now run the copy job itself
if (rval = copyFSJob()->run(*report))
if ((rval = copyFSJob()->run(*report)))
{
// and if the copy job succeeded, check the target
if (rval = checkTargetJob()->run(*report))
if ((rval = checkTargetJob()->run(*report)))
{
// ok, everything went well
rval = true;

View File

@ -141,7 +141,7 @@ bool ResizeOperation::execute(Report& parent)
Report* report = parent.newChild(description());
if (rval = checkOriginalJob()->run(*report))
if ((rval = checkOriginalJob()->run(*report)))
{
// Extended partitions are a special case: They don't have any file systems and so there's no
// need to move, shrink or grow their contents before setting the new geometry. In fact, trying

View File

@ -120,15 +120,15 @@ bool RestoreOperation::execute(Report& parent)
{
restorePartition().setState(Partition::StateNone);
if (rval = restoreJob()->run(*report))
if ((rval = restoreJob()->run(*report)))
{
if (rval = checkTargetJob()->run(*report))
if ((rval = checkTargetJob()->run(*report)))
{
// If the partition was written over an existing one, the partition itself may now
// be larger than the filesystem, so maximize the filesystem to the partition's size
// or the image length, whichever is larger. If this fails, don't return an error, just
// warn the user.
if (warning = !maximizeJob()->run(*report))
if ((warning = !maximizeJob()->run(*report)))
report->line() << i18nc("@info/plain", "Warning: Maximizing file system on target partition <filename>%1</filename> to the size of the partition failed.", restorePartition().deviceNode());
}
else