File indexing completed on 2024-05-12 16:02:30

0001 /*
0002  *  SPDX-FileCopyrightText: 2017 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #include "KoProgressProxy.h"
0008 
0009 #include <QString>
0010 
0011 void KoProgressProxy::setAutoNestedName(const QString &name)
0012 {
0013     if (name.isEmpty()) {
0014         setFormat("%p%");
0015     } else {
0016         if (maximum() > 0) {
0017             setFormat(QString("%1: %p%").arg(name));
0018         } else {
0019             setFormat(name);
0020         }
0021     }
0022 }