- 
    Task 
- 
    Resolution: Unresolved
- 
    P3: Somewhat important 
- 
    6.8.0
performOperation(root.locking.lock(), "locking")
.then(() => performOperation(aaa(), "opening damage"))
.then(() => performOperation(bbb(), "removing file"))
.then(() => {
    console.debug("moveToTrash: ", filePath);
    const success = Ibh.FileIo.moveToTrash(filePath);
    if (!success) {
        return Promise.reject("Failed to move file to trash");
    }
{color:#000000}}).catch(error => {
    console.error("Operation failed:", error);
    errorOccurred(error);
{color:#000000}});
 
converts to:
performOperation(root.locking.lock(), "locking").then(() => performOperation(aaa(), "opening damage")).then(() => performOperation(bbb(), "removing file")).then(() => {
    console.debug("moveToTrash: ", filePath);
    const success = Ibh.FileIo.moveToTrash(filePath);
    if (!success) {
        return Promise.reject("Failed to move file to trash");
    }
{color:#000000}}).catch(error => {
    console.error("Operation failed:", error);
    errorOccurred(error);
{color:#000000}});
 
 
There is no line size limit, so additional .then statements will get written in the same line. I would really like to see them getting formatted like the first code.
- relates to
- 
                    QTBUG-113590 Add support for column width and line break in qmlformat -         
- Closed
 
-