----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/128277/ -----------------------------------------------------------
Review request for KDE Frameworks. Repository: kio Description ------- Replace two isDir debug assertions with conditionals, because there is no guarantee that the parameter is a directory. Diffs ----- autotests/kdirmodeltest.cpp 1a14a01 src/widgets/kdirmodel.cpp eab0121 Diff: https://git.reviewboard.kde.org/r/128277/diff/ Testing ------- To test, I first configured ASAN by passing the following to cmake: `-DCMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=undefined"` KDirModel::index was tested as follows: ``` make kdirmodeltest ASAN_OPTIONS=detect_leaks=0 ./autotests/kdirmodeltest testIndex ``` KDirModel::fetchMore is tested as follows (manually): 1. Create `a.out` as follows: ```c++ // g++ `pkg-config --cflags --libs Qt5Widgets` main.cpp -fPIC -fsanitize=address #include <QApplication> #include <QFileDialog> #include <QTemporaryDir> int main(int argc, char **argv) { QTemporaryDir tempDir; QFile(tempDir.path() + "/filename.tex").open(QIODevice::WriteOnly); QApplication app(argc, argv); QStringList filesNames = QFileDialog::getOpenFileNames( Q_NULLPTR, "Open File", tempDir.path(), "TeX files (*.tex)"); return app.exec(); } ``` 2. Run it. In the file dialog, type "./". 3. A dropdown shows the files in the directory ("filename.tex"). 4. Press arrow down. Now the filename will be matched and NOTHING should happen. Before this patch, step 4 would crash; This is a reduced test case based on a crash when I tried to save my work in TexMaker's (Save As dialog). Thanks, Rob Wu
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel