Skip to content

Commit ac24e40

Browse files
committed
Delete app's jumplist on uninstall
Minor code fix, bug fix
1 parent 4b4ed69 commit ac24e40

31 files changed

+90
-87
lines changed

Source/Core/FileTypeCheckTask.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#include "IFileList.h"
66

77
struct BadFileFormat {
8-
size_t index;
8+
size_t index = -1;
99
std::string fileName;
1010
std::string message;
1111
std::string mimeType;
1212
int64_t fileSize = -1;
13-
const ServerProfile* uploadProfile;
13+
const ServerProfile* uploadProfile = nullptr;
1414
};
1515

1616
class FileTypeCheckTask: public BackgroundTask {

Source/Core/Images/Utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ CString GdiplusStatusToString(Gdiplus::Status statusID) {
613613
}
614614

615615
std::unique_ptr<Bitmap> RemoveAlpha(Bitmap* bm, Color color) {
616-
std::unique_ptr<Bitmap> res(new Bitmap(bm->GetWidth(), bm->GetHeight(), PixelFormat32bppARGB));
616+
auto res = std::make_unique<Bitmap>(bm->GetWidth(), bm->GetHeight(), PixelFormat32bppARGB);
617617

618618
if (res->GetLastStatus() != Ok) {
619619
return {};

Source/Core/Scripting/API/HtmlDocument.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Sqrat::Array HtmlDocument::querySelectorAll(const std::string& query)
6868
return d_->querySelectorAll(query);
6969
}
7070

71-
const std::string HtmlDocument::getHTML()
71+
std::string HtmlDocument::getHTML()
7272
{
7373
return d_->getHTML();
7474
}

Source/Core/Scripting/API/HtmlDocument.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class HtmlDocument {
2525
Return an array of HtmlElement matched to query.
2626
*/
2727
Sqrat::Array querySelectorAll(const std::string& query);
28-
const std::string getHTML();
28+
std::string getHTML();
2929
protected:
3030
std::shared_ptr<HtmlDocumentPrivate> d_;
3131
};
@@ -35,4 +35,4 @@ void RegisterHtmlDocumentClass(Sqrat::SqratVM& vm);
3535
/* @endcond */
3636

3737
}
38-
#endif
38+
#endif

Source/Core/Scripting/API/HtmlDocumentPrivate_win.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class HtmlDocumentPrivate {
5555
return rootElement().querySelectorAll(query);
5656
}
5757

58-
const std::string getHTML() {
58+
std::string getHTML() {
5959
return rootElement().getOuterHTML();
6060
}
6161
friend class HtmlElementPrivate;
@@ -70,4 +70,4 @@ class HtmlDocumentPrivate {
7070
};
7171

7272
}
73-
#endif
73+
#endif

Source/Core/Scripting/API/HtmlElement.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ HtmlElement::HtmlElement(HtmlElementPrivate* pr)
4242

4343

4444

45-
const std::string HtmlElement::getAttribute(const std::string& name)
45+
std::string HtmlElement::getAttribute(const std::string& name)
4646
{
4747
if ( !checkNull("getAttribute") ) {
4848
return std::string();
@@ -66,7 +66,7 @@ void HtmlElement::removeAttribute(const std::string& name)
6666
d_->removeAttribute(name);
6767
}
6868

69-
const std::string HtmlElement::getId()
69+
std::string HtmlElement::getId()
7070
{
7171
if ( !checkNull("getId") ) {
7272
return std::string();
@@ -82,7 +82,7 @@ void HtmlElement::setId(const std::string& id)
8282
d_->setId(id);
8383
}
8484

85-
const std::string HtmlElement::getInnerHTML()
85+
std::string HtmlElement::getInnerHTML()
8686
{
8787
if ( !checkNull("getInnerHTML") ) {
8888
return std::string();
@@ -98,7 +98,7 @@ void HtmlElement::setInnerHTML(const std::string& html)
9898
d_->setInnerHTML(html);
9999
}
100100

101-
const std::string HtmlElement::getInnerText()
101+
std::string HtmlElement::getInnerText()
102102
{
103103
if ( !checkNull("getInnerText") ) {
104104
return std::string();
@@ -114,7 +114,7 @@ void HtmlElement::setInnerText(const std::string& text)
114114
d_->setInnerText(text);
115115
}
116116

117-
const std::string HtmlElement::getOuterHTML()
117+
std::string HtmlElement::getOuterHTML()
118118
{
119119
if ( !checkNull("getOuterHTML") ) {
120120
return std::string();
@@ -130,7 +130,7 @@ void HtmlElement::setOuterHTML(const std::string& html)
130130
d_->setOuterHTML(html);
131131
}
132132

133-
const std::string HtmlElement::getOuterText()
133+
std::string HtmlElement::getOuterText()
134134
{
135135
if ( !checkNull("getOuterText") ) {
136136
return std::string();
@@ -154,15 +154,15 @@ void HtmlElement::setValue(const std::string& value)
154154
d_->setValue(value);
155155
}
156156

157-
const std::string HtmlElement::getValue()
157+
std::string HtmlElement::getValue()
158158
{
159159
if ( !checkNull("getValue") ) {
160160
return std::string();
161161
}
162162
return d_->getValue();
163163
}
164164

165-
const std::string HtmlElement::getTagName()
165+
std::string HtmlElement::getTagName()
166166
{
167167
if ( !checkNull("getTagName") ) {
168168
return std::string();

Source/Core/Scripting/API/HtmlElement.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ class HtmlElement {
3535
HtmlElement();
3636
HtmlElement(HtmlElementPrivate* pr);
3737

38-
const std::string getAttribute(const std::string& name);
38+
std::string getAttribute(const std::string& name);
3939
void setAttribute(const std::string& name, const std::string& value);
4040
void removeAttribute(const std::string& name);
41-
const std::string getId();
41+
std::string getId();
4242
void setId(const std::string& id);
43-
const std::string getInnerHTML();
43+
std::string getInnerHTML();
4444
void setInnerHTML(const std::string& html);
45-
const std::string getInnerText();
45+
std::string getInnerText();
4646
void setInnerText(const std::string& text);
47-
const std::string getOuterHTML();
47+
std::string getOuterHTML();
4848
void setOuterHTML(const std::string& html);
49-
const std::string getOuterText();
49+
std::string getOuterText();
5050
void setOuterText(const std::string& text);
5151
/**
5252
Set value of an input element.
@@ -58,8 +58,8 @@ class HtmlElement {
5858
/**
5959
Get value of an input element.
6060
*/
61-
const std::string getValue();
62-
const std::string getTagName();
61+
std::string getValue();
62+
std::string getTagName();
6363
HtmlElement getParentElement();
6464
void scrollIntoView();
6565
void click();
@@ -86,4 +86,4 @@ void RegisterHtmlElementClass(Sqrat::SqratVM& vm);
8686
/* @endcond */
8787

8888
}
89-
#endif
89+
#endif

Source/Core/Scripting/API/HtmlElementPrivate_win.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void HtmlElementPrivate::setValue(const std::string& value) {
5151
input->put_value(CComBSTR(IuCoreUtils::Utf8ToWstring(value).c_str()));
5252
}
5353

54-
const std::string HtmlElementPrivate::getValue()
54+
std::string HtmlElementPrivate::getValue()
5555
{
5656
CComQIPtr<IHTMLInputElement> input = disp_ ? CComQIPtr<IHTMLInputElement> (disp_) : CComQIPtr<IHTMLInputElement> (elem_);
5757
if ( !input ) {
@@ -85,4 +85,4 @@ CComQIPtr<IAccessible> HTMLElementToAccessible(IHTMLElement* pHtmlElement)
8585
return CComQIPtr<IAccessible>();
8686
}
8787

88-
}
88+
}

Source/Core/Scripting/API/HtmlElementPrivate_win.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class HtmlElementPrivate {
6060
docPrivate_= docPrivate;
6161
}
6262

63-
const std::string getAttribute(const std::string& name)
63+
std::string getAttribute(const std::string& name)
6464
{
6565
if ( name == "class" || !IuStringUtils::stricmp(name.c_str(), "class")) {
6666
return getClassName();
@@ -72,7 +72,7 @@ class HtmlElementPrivate {
7272
return std::string();
7373
}
7474

75-
const std::string getClassName() {
75+
std::string getClassName() {
7676

7777
CComBSTR res;
7878
if ( SUCCEEDED( elem_->get_className(&res) ) && res ) {
@@ -98,7 +98,7 @@ class HtmlElementPrivate {
9898
elem_->removeAttribute(CComBSTR(IuCoreUtils::Utf8ToWstring(name).c_str()), 0, &res);
9999
}
100100

101-
const std::string getId()
101+
std::string getId()
102102
{
103103
CComBSTR res;
104104
if ( SUCCEEDED ( elem_->get_id(&res) ) && res ) {
@@ -112,7 +112,7 @@ class HtmlElementPrivate {
112112
elem_->put_id((CComBSTR(IuCoreUtils::Utf8ToWstring(id).c_str())));
113113
}
114114

115-
const std::string getInnerHTML()
115+
std::string getInnerHTML()
116116
{
117117
CComBSTR res;
118118
if ( SUCCEEDED( elem_->get_innerHTML(&res) ) && res ) {
@@ -126,7 +126,7 @@ class HtmlElementPrivate {
126126
elem_->put_innerHTML(CComBSTR(IuCoreUtils::Utf8ToWstring(html).c_str()));
127127
}
128128

129-
const std::string getInnerText()
129+
std::string getInnerText()
130130
{
131131
CComBSTR res;
132132
if ( SUCCEEDED( elem_->get_innerText(&res) ) && res ) {
@@ -140,7 +140,7 @@ class HtmlElementPrivate {
140140
elem_->put_innerText(CComBSTR(IuCoreUtils::Utf8ToWstring(text).c_str()));
141141
}
142142

143-
const std::string getOuterHTML()
143+
std::string getOuterHTML()
144144
{
145145
CComBSTR res;
146146
if ( SUCCEEDED( elem_->get_outerHTML(&res) ) && res ) {
@@ -154,7 +154,7 @@ class HtmlElementPrivate {
154154
elem_->put_outerHTML(CComBSTR(IuCoreUtils::Utf8ToWstring(html).c_str()));
155155
}
156156

157-
const std::string getOuterText()
157+
std::string getOuterText()
158158
{
159159
CComBSTR res;
160160
if ( SUCCEEDED( elem_->get_outerText(&res) ) && res ) {
@@ -168,7 +168,7 @@ class HtmlElementPrivate {
168168
elem_->put_outerText(CComBSTR(IuCoreUtils::Utf8ToWstring(text).c_str()));
169169
}
170170

171-
const std::string getTagName()
171+
std::string getTagName()
172172
{
173173
CComBSTR res;
174174
if ( SUCCEEDED( elem_->get_tagName(&res) ) && res ) {
@@ -181,7 +181,7 @@ class HtmlElementPrivate {
181181
}
182182

183183
void setValue(const std::string& value);
184-
const std::string getValue();
184+
std::string getValue();
185185

186186
HtmlElement getParentElement()
187187
{

Source/Core/Scripting/API/Process.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "Process.h"
1+
#include "Process.h"
22

33
#undef environ
44
#include <algorithm>
@@ -222,7 +222,7 @@ int Process::waitForExit()
222222
return d_->waitForExit();
223223
}
224224

225-
const std::string Process::readOutput()
225+
std::string Process::readOutput()
226226
{
227227
std::string res;
228228
d_->readOutput(res);
@@ -239,7 +239,7 @@ void Process::setCaptureOutput(bool read)
239239
d_->readProcessOutput_ = read;
240240
}
241241

242-
const std::string Process::findExecutableInPath(const std::string& executable)
242+
std::string Process::findExecutableInPath(const std::string& executable)
243243
{
244244
return bp::search_path(executable).string();
245245
}
@@ -276,4 +276,4 @@ void RegisterProcessClass(Sqrat::SqratVM& vm)
276276
);
277277

278278
}
279-
}
279+
}

0 commit comments

Comments
 (0)