Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/TextUI/Query/FileTextQuery.cpp

    rd754bb r8df74d  
    2121
    2222#include <iostream>
    23 #include <string>
    2423
    2524#include <boost/filesystem.hpp>
    2625
    27 #include "TextUI/Query/TextQuery.hpp"
     26#include "TextUI/TextDialog.hpp"
    2827
    2928#include "Helpers/Log.hpp"
     
    3837
    3938bool TextDialog::FileTextQuery::handle() {
    40   bool badInput = false;
     39  Log() << Verbose(0) << getTitle();
    4140  std::string tempstring;
    42   do{
    43     badInput = false;
    44     std::cout << getDescription() << ": ";
    45     std::cin >> tempstring;
    46     if(std::cin.fail()){
    47       badInput = true;
    48       std::cin.clear();
    49       std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
    50       std::cout << "Input was not a number!" << std::endl;
    51       continue;
    52     }
    53   } while(badInput);
    54   std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
     41  getline(cin,tempstring);
    5542  tmp = tempstring;
    5643  return true;
Note: See TracChangeset for help on using the changeset viewer.