Skip to content

Commit 998c924

Browse files
authored
more typos
1 parent a4e24b1 commit 998c924

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/type_rich_api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1232,7 +1232,7 @@ Sleep(MilliSeconds(3));
12321232
this_thread::sleep_for(chrono::seconds(3));
12331233
```
12341234

1235-
如果你 `using namespace std::literials;` 还可以这样快捷地创建字面量:
1235+
如果你 `using namespace std::literals;` 还可以这样快捷地创建字面量:
12361236
```cpp
12371237
this_thread::sleep_for(3ms); // 3 毫秒
12381238
this_thread::sleep_for(3s); // 3 秒

docs/unicode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,10 +3051,10 @@ QString str = codec->toUnicode(bytes);
30513051
#### 字符串常量
30523052
30533053
```cpp
3054-
QString str = QStringLiterial("你好,世界");
3054+
QString str = QStringLiteral("你好,世界");
30553055
```
30563056

3057-
`QStringLiterial` 可以保证,转换时采用的是所谓“运行字符集”(实际应该叫字面量字符编码),也就是我们开发者电脑上的“区域设置”,是编译期确定的。而如果写 `QString::fromLocal8Bits("")` 就变成 “ANSI”,客户的“区域设置”了。这两个字符编码,比如在之前跨国 galgame 的案例中,就是不同的。
3057+
`QStringLiteral` 可以保证,转换时采用的是所谓“运行字符集”(实际应该叫字面量字符编码),也就是我们开发者电脑上的“区域设置”,是编译期确定的。而如果写 `QString::fromLocal8Bits("")` 就变成 “ANSI”,客户的“区域设置”了。这两个字符编码,比如在之前跨国 galgame 的案例中,就是不同的。
30583058

30593059
#### QTextStream
30603060

0 commit comments

Comments
 (0)