1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02: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> <item>
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
<property name="text"> <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> </property>
</widget> </widget>
</item> </item>

View File

@ -221,11 +221,9 @@ void Speller::replaceWord()
text.replace(m_startPos, m_endPos - m_startPos, word); text.replace(m_startPos, m_endPos - m_startPos, word);
text.replace(QLatin1Char('\\'), QLatin1String("\\\\")); text.replace(QLatin1Char('\\'), QLatin1String("\\\\"));
text.replace(QLatin1Char('\n'), QLatin1String("\\n"));
text.replace(QLatin1Char('\''), QLatin1String("\\'")); 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.value='%1'").arg(text));
m_element.evaluateJavaScript(QString("this.selectionStart=this.selectionEnd=%1").arg(cursorPos)); 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"> <form action="http://www.qupzilla.com/" method="post">
Username: <input type="text" name="user" /><br/> Username: <input type="text" name="user" /><br/>
Password: <input type="password" name="pass" /> Password: <input type="password" name="pass" />
<br/>
Text:
<textarea cols="50" rows="6" spellcheck="yes"></textarea>
<br/>
<input type="submit" value="Send" /> <input type="submit" value="Send" />
</form> </form>
<p> <p>

View File

@ -4247,10 +4247,6 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla
<source>SpellCheck</source> <source>SpellCheck</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </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> <message>
<source>Change...</source> <source>Change...</source>
<translation type="unfinished"></translation> <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> <source>Add new word:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>&lt;b&gt;Dictionary path&lt;/b&gt;</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>Speller</name> <name>Speller</name>