1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 04:36:34 +01:00

[spellcheck] Fixed replacing words in multiple lines text.

This commit is contained in:
nowrep 2013-02-06 12:06:35 +01:00
parent 67a08d237d
commit 785b9fcdbe
4 changed files with 10 additions and 8 deletions

View File

@ -17,7 +17,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Dictionary path&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;b&gt;Dictionary path&lt;/b&gt;</string>
</property>
</widget>
</item>

View File

@ -221,11 +221,9 @@ void Speller::replaceWord()
text.replace(m_startPos, m_endPos - m_startPos, word);
text.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
text.replace(QLatin1Char('\n'), QLatin1String("\\n"));
text.replace(QLatin1Char('\''), QLatin1String("\\'"));
word.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
word.replace(QLatin1Char('\''), QLatin1String("\\'"));
m_element.evaluateJavaScript(QString("this.value='%1'").arg(text));
m_element.evaluateJavaScript(QString("this.selectionStart=this.selectionEnd=%1").arg(cursorPos));
}

View File

@ -8,6 +8,10 @@
<form action="http://www.qupzilla.com/" method="post">
Username: <input type="text" name="user" /><br/>
Password: <input type="password" name="pass" />
<br/>
Text:
<textarea cols="50" rows="6" spellcheck="yes"></textarea>
<br/>
<input type="submit" value="Send" />
</form>
<p>

View File

@ -4247,10 +4247,6 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<source>SpellCheck</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Dictionary path&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Change...</source>
<translation type="unfinished"></translation>
@ -4283,6 +4279,10 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<source>Add new word:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;b&gt;Dictionary path&lt;/b&gt;</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Speller</name>