Skip to content

Commit 372135a

Browse files
committed
Update mainwindow.cpp
Now converts key to uppercase
1 parent d929b7d commit 372135a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Calculator/mainwindow.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ QString Qkey;
1212
std::string encryptDecrypt(std::string toEncrypt) {
1313
//QString Qkey = ui->lineEdit->displayText();
1414
std::string key1 = Qkey.toStdString();
15+
// convert string to upper case
16+
std::for_each(key1.begin(), key1.end(), [](char & c){
17+
c = ::toupper(c);
18+
});
1519
//char keyT[10] = {'K', 'C', 'Q'}; //Any chars will work
1620
if(key1.length() <= 0)
1721
{

0 commit comments

Comments
 (0)