Skip to content

ファイルダイアログで出力先バッファサイズを意識する#2530

Merged
berryzplus merged 4 commits into
sakura-editor:masterfrom
berryzplus:feature/fix_file_dialog
Jul 12, 2026
Merged

ファイルダイアログで出力先バッファサイズを意識する#2530
berryzplus merged 4 commits into
sakura-editor:masterfrom
berryzplus:feature/fix_file_dialog

Conversation

@berryzplus

Copy link
Copy Markdown
Contributor

PR対象

  • アプリ(サクラエディタ本体)
  • テストコード

カテゴリ

  • 改善

PR の背景

仕様・動作説明

  • C++20で導入された std::span を活用して、書き込み先バッファのサイズを渡すようにする。

LPWSTR 文字列ポインタ。別途サイズ引数を渡さない限り、サイズ不明。
std::span<WCHAR> 配列参照。ポインタ先頭+サイズをオブジェクト化したもの。

WCHAR[N]std::span<WCHAR> に暗黙変換できるので、呼び出し側を変更する必要はなし。

PR の影響範囲

テスト内容

関連 issue, PR

参考資料

@github-actions

Copy link
Copy Markdown

Test Results

1 111 tests  +10   1 111 ✅ +10   2m 47s ⏱️ +8s
  106 suites + 1       0 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 89c1189. ± Comparison against base commit 40241ff.

This pull request removes 7 and adds 17 tests. Note that renamed tests count towards both.
DlgOpenFileTest ‑ CommonFileDialogCreate
DlgOpenFileTest ‑ CommonFileDialogDefaltFilterLong
DlgOpenFileTest ‑ CommonFileDialogDefaltFilterMany
DlgOpenFileTest ‑ CommonItemDialogCreate
DlgOpenFileTest ‑ CommonItemDialogDefaltFilterLong
DlgOpenFileTest ‑ Construct
DlgOpenFileTest ‑ ommonItemDialogDefaltFilterMany
FileDialog/FileDialogTest ‑ Create001/0
FileDialog/FileDialogTest ‑ Create001/1
FileDialog/FileDialogTest ‑ Create002_LongFilter/0
FileDialog/FileDialogTest ‑ Create002_LongFilter/1
FileDialog/FileDialogTest ‑ Create003_ManyFiltersy/0
FileDialog/FileDialogTest ‑ Create003_ManyFiltersy/1
FileDialog/FileDialogTest ‑ DoModalOpenDlg101/0
FileDialog/FileDialogTest ‑ DoModalOpenDlg101/1
FileDialog/FileDialogTest ‑ DoModalSaveDlg101/0
FileDialog/FileDialogTest ‑ DoModalSaveDlg101/1
…

@sonarqubecloud

Copy link
Copy Markdown

@berryzplus
berryzplus marked this pull request as ready for review July 12, 2026 07:22
@berryzplus
berryzplus merged commit 654e67c into sakura-editor:master Jul 12, 2026
27 of 28 checks passed
@berryzplus
berryzplus deleted the feature/fix_file_dialog branch July 12, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant