쉼표
이 경고 카테고리의 철자는 [comma]
입니다.
쉼표 표현을 사용하지 마세요.
무슨 일이 있었나요?
JavaScript 쉼표 표현식이 for 루프 외부에서 사용되었습니다.
이것이 왜 나쁜가요?
쉼표 표현식은 코드의 가독성을 떨어뜨리고 부작용을 유발합니다.
예시
import QtQuick Item { Component.onCompleted: init(config, true), enableLogging(categories), run(1000) // millis }
이 경고를 해결하려면 각 연산에 대해 별도의 문을 사용하도록 코드를 리팩터링하세요. 이렇게 하면 각 부작용이 관련 없는 다른 작업의 일부로 발생하는 대신 명시적으로 나타납니다:
import QtQuick Item { Component.onCompleted: { init(config, true) enableLogging(categories) run(1000) // millis } }
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.